A Pakistani female supporter of Muttahida Quami Movement (MQM) carries a photograph of gunshot victim, Malala Yousafzai as she prays for the recovery of Malala Yousafzai, in Karachi on October 10, 2012. Pakistani doctors removed a bullet from a 14-year-old child campaigner shot by the Taliban in a horrific attack condemned by national leaders and rights activists. The attack took place in Mingora, the main town of the Swat valley in Pakistan's northwest, where Malala had campaigned for the right to an education during a two-year Taliban insurgency which the army said it had crushed in 2009. AFP PHOTO/ RIZWAN TABASSUM

A child holds aloft a photo of Malala Yousafzai during a protest in Karachi over her shooting by the Taliban.

THE targeting of Malala Yousafzai, the 15-year-old girl shot this month 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-coloured Toyota four-wheel-drives 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 harboured 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 honour 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. It would be against ''world-devouring'' US imperialism and its proxies, the ''blood-sucking Zionists''; 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 nine; 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 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 that gave diplomatic immunity to non-diplomatic US personnel working in Iran.

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.

Two factors have since veiled the Western 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 US 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 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 under-represented 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 towards 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, a woman is defined as the ''complement with the man in the family''.

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

Western politicians can apologise for crooked policies and retreat into passivity for fear of committing new errors. 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's 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.