IN “Garden of the Brave in War,” his classic memoir of life on a pomegranate farm in 1960s Iran, the American writer Terence O’Donnell recounts how his illiterate house servant, Mamdali, would wake him every morning with a loud knock on the door and a simple question: “Are you an Arab or an Iranian?”

“If I was naked,” O’Donnell explained, “I would answer that I’m an Arab and he would wait outside the door, whereas if I was clothed I would reply that I was an Iranian and he would come in with the coffee.” This joke went hand in hand, O’Donnell wrote, with an age-old chauvinism that depicted the Persians’ Arab neighbors as “uncivilized people who went about unclothed and ate lizards.”

The Islamist victors of the 1979 Iranian revolution intended to change things, to replace the shah’s haughty Persian nationalism with an Arab-friendly, pan-Islamic ideology. Yet Tehran’s official reaction to the 2011 Arab awakening shows that, at the heart of the Islamic Republic of Iran’s Middle East strategy, there is a veiled contempt for Arab intelligence, autonomy and prosperity.

What many young Iranians see as a familiar struggle for justice, economic dignity and freedom from dictatorial rule, Iranian officialdom has struggled to spin as a belated Arab attempt to emulate the Islamic revolution and join Tehran in its battle against America and Israel.