The targeting of Malala Yousafzai, the 15-year-old girl shot nearly two weeks ago by a Pakistani Taliban assassin, brought back memories of my teenage years in Tehran, where theocratic zealots were similarly in control. The words of the Taliban’s chief spokesman, Ehsanullah Ehsan, had a chillingly familiar echo in my ears. A bullet had Malala’s name on it, he explained to the news media, because “she has become a symbol of Western culture in the area; she was openly propagating it.” He also called her “the symbol of the infidels and obscenity.”

The zealots of my era, circa 1982, prowled Tehran’s streets in khaki-colored Toyota SUVs and stopped girls and women of all stripes, ages and ethnicities, warning them if their scarves had slipped back. On good days, rather than arrest and haul us away, they would only scold: “Our men are being martyred by Saddam to protect your virtue.”

Iran’s war with Saddam Hussein’s Iraq was then in its second year; it was begun by the ambitious Iraqi dictator, who harbored expansionist dreams. But in the course of daily life in Iran, where harassment of women was reaching a fever pitch, the war was not over land or resources, but the honor of the nation’s women.

The war with Iraq was not even the one the country was told to gird itself against. The bigger, bloodier but ultimately triumphant jihad was yet to come, Ayatollah Khomeini reminded us daily. It would be against “world-devouring” U.S. imperialism and its proxies, the “blood-sucking Zionists,” he said; they were at the root of all the world’s evil.

That all-out war, forever looming, has never come. But the war on women has been raging ever since.

At the school gates every morning, we were greeted by our own Taliban, members of the the morality unit, in charge of “preventing vice and promoting virtue.” They rubbed the face of my rosy-cheeked classmate to the point of bleeding to make sure she was not wearing rouge and pulled at the long eyelashes of another to see if they were real. We missed months of math that year because schools were newly segregated by gender and there were not enough trained female instructors in the country to teach in the girls-only classrooms. Two months before the end of the year, a few of us signed up for private lessons given by a man who stared at the ceiling while teaching, lest he violate segregation laws by looking at us.

The burning effigies of Uncle Sam, and the inflammatory rhetoric against modernity and the West, had done their work. The world cringed and turned away from Iran. Just then, the age of marriage was lowered to 9; the weight of a woman’s testimony in a criminal trial was halved against a man’s; divorce, abortion, inheritance and custody rights were slashed; several academic fields and careers were banned to women; and the Islamic dress code was reinstituted. Public spaces in Tehran, including buses, were segregated by gender, and the faithful’s fists pumped into the air, punctuating Friday prayers with “death to America” chants.

Credit for the discovery of this wicked double helix — the pairing of dramatic acts of anti-Americanism with an insidious assault on women, which subsequently infiltrated the DNA of fundamentalists throughout the region — goes to Ayatollah Khomeini.

Early in his long career, he gave speech after speech about the “toxic” influence of the Pahlavi monarchy on the nation’s family values — the ayatollah’s euphemism for the growing freedoms of women under the shah. But Khomeini’s anti-feminist diatribe did not catch the public’s imagination. What catapulted him to national stature began with his fiery criticism of a 1964 decree, known as the “capitulation law,” that gave diplomatic immunity to non-diplomatic U.S. personnel working in Iran.

“They have reduced the Iranian people to a level lower than that of an American dog,” went one of the ayatollah’s most memorable lines from the first of a series of speeches in which his anti-imperialist tenor steadily grew. By 1978, when his journeys through exile landed him in France, he no longer sounded like his misogynist self of a decade earlier.

Now Khomeini cast himself as a nationalist in the image of Mahatma Gandhi, fighting the foreign powers that were plundering his motherland. His anti-Americanism lifted him to nationwide leadership, and he set to work on his earlier agenda. Days after his arrival in Tehran in February 1979, he issued an order to abolish women’s freedom in dress and to bring back the mandatory hijab. After protests broke out and were widely reported by the international media, he retreated.

Nine months later, the U.S. Embassy was seized in Tehran. As the news media became consumed by the fate of the 52 American hostages there, the ayatollah again ordered the dress code. This time, when all eyes were averted, he succeeded.

Two factors have since veiled the U.S. perspective on the region: The first is the expression of anti-Americanism, which sends the rejected American psyche into a downward spiral of introspection over feckless U.S. policies and leads to inaction. The second is the use of Islam as a wall of privacy, behind which oppressors act with impunity. Both factors function, in great part, as a disguise. Behind them, where women are concerned, all the seemingly unbridgeable divides merge seamlessly to connect Sunni Saudi Arabia to Shiite Iran.

Thus far, the Arab Spring has brought a severe frost to women’s rights. In Libya, women are grossly underrepresented in the new government. In Egypt, the image of a female protester, her blue bra exposed as she was dragged through the streets of Cairo in December 2011, has become a new symbol of brutality against women. The March 2012 acquittal of a military doctor accused of carrying out virginity tests on female detainees attests to the prevalence of state-sponsored violence toward women.

In Tunisia, the rise of the Islamist Ennahda party has come with alarming public displays of intolerance for freedom of speech. In the new draft constitution — unlike its 1959 predecessor, which held men and women as equals — a woman is defined as the “complement with the man in the family and an associate to the man in the development of the country.”

These pressures will inevitably lead to acts of rebellion. In the Semnan region of Iran a few weeks ago, a cleric passing two women told one to cover her head better, according to an Iranian news agency report. The woman, punching him to the ground, told him to cover his eyes.

Western politicians can apologize for crooked policies and retreat into passivity for fear of committing new errors, which are bound to be deemed as new sins by future generations. Yet none will change the elemental facts. The notion of an Islamic democracy is merely another euphemism for turning women into lesser citizens, and it ought to be deemed as unjust and anti-democratic as America before the end of racial segregation. “Terrorism” is only one manifestation of the evil that the world hopes to root out from the region where part-time terrorists have always been full-time chauvinists.

The real enemy is misogyny. Malala Yousafzai is not just a teenager in Pakistan’s Swat Valley but a victim of the greatest apartheid of our time, and a wounded warrior in feminism’s newest front line.

Roya Hakakian is the author of two books of poetry in Persian and the recipient of a Guggenheim fellowship in nonfiction. Her most recent book is “Assassins of the Turquoise Palace,” an account of a 1992 plot to kill Iranian dissidents in Berlin. She left Iran in 1984.

Read more from Outlook, friend us on Facebook, and follow us on Twitter.