The crowd of boys wore ninja-style headbands, an accessory associated here with Iran's unofficial and occasionally head-knocking revolutionary patrols. They carried anti-U.S. posters. They shouted death to America.

"Where are you from?" they cried to a visitor watching them.

"The U.S.," he replied.

"Ah. Very good. Welcome to Iran."

In the middle of a boisterous march today commemorating the 20th anniversary of the takeover of the U.S. Embassy here--a march of chest-pounding and burning effigies and fists in the air and hard, unshaven faces--it was difficult, between handshakes, to tell how genuine the displays of venom really were.

Iran has begun a society-wide discussion about how to reshape its strict and generally anti-U.S. theocracy in favor of more democratic institutions. The struggle plays out daily in the courts, the press, the parliament, in tea shop discussions and in theological debates.

The demonstration at the gates of one of the Iranian revolution's central monuments--the "den of spies" occupied by students and their Americans hostages for 444 days--was seen by conservatives this year as a response to the impression that enthusiasm is flagging for the extreme form of Islamic rule set in motion back in 1979. The issue has become particularly important as Iranian leaders, hard-line clerics on one side and reform advocates on the other, seek support among the voters for critical parliamentary elections scheduled in February.

The embassy takeover was a widely applauded gesture at the time. It emboldened the revolution's harsher side, crowning the late Ayatollah Ruhollah Khomeini as its leader, and it jelled what has become two decades of hostility with the United States. But judging by conversations outside the embassy today, times have changed and many Iranians' ideas are less clear-cut than they were 20 years ago.

"I agree we should have economic relations with America," said Jaffar Liyavi, a petroleum industry engineer who said he would like to see his industry escape from U.S. sanctions and be revitalized with new investment. "We should not pay any price," he cautioned. "Up until the Islamic revolution, there were thousands of American consultants in [the oil fields of] Iran, and they were not supporting the benefit of Iran."

The Nov. 4 march before the embassy has become an annual event, part of what conservative Iranian leaders have dubbed their "Anti-Arrogance Campaign" in support of the revolution that toppled Shah Mohammed Reza Pahlavi and brought to power a hard-line clerical state symbolized by Khomeini's frown. The takeover and the crisis over U.S. hostages constituted a turning point in relations between two once closely allied nations, generating stereotypes that persist in the politics of each--of the United States as a "great satan" and enemy of Islam, and of Iran as lawless and unpredictable.

The election of President Mohammed Khatemi in May 1997 on a program of liberalizing reforms brought hints of a U.S.-Iranian dialogue to come. A debate has swelled and each side has made gestures since then, but concrete progress has been minimal.

And so on the street in front of the embassy today, the now familiar rhetoric and props were back on display--skeletal Uncle Sams, shovels to bury President "Kelinton," drawings with vampirish fingernails. "America, blood is dripping from your hands," read the accompanying text.

"Iran will never compromise," in its attitude toward the United States, said one speaker, his amplified voice echoing along Talerani street in front of the embassy compound walls that remain decorated with anti-U.S. paintings and slogans.

A burning Israeli flag was raised. Three men carried a large, blood-red bald eagle. Just a day before, the country's supreme clerical leader, Ayatollah Ali Khamenei, said that anyone who advocates improved ties with the United States is either a "traitor" or a "simpleton."

Yet while the chant of "Death to America" was at times earsplitting among the several thousand Iranian men, women and children who demonstrated, eye contact usually brought a smile, and conversation a more finely shaded opinion--signs of how broad public opinion here has become and how much it is diverging from the former orthodoxy.

There were no blanket calls for renewed relations with the United States, although that opinion is common now in Iran. And there was plenty of specific criticism, particularly when it came to American support for Israel. But neither, in this seemingly absolutist setting, was the thinking monolithic or unreasoned.

There were hard feelings bound to events long past. People recalled that in 1953 the United States helped remove a democratically elected Iranian president and reinstall a monarchy that became notorious for lavish spending, brutal security tactics--and close association with Washington.

"Forty-eight years ago I was a soldier in the army and my boss, a general, had to answer to an American sergeant. It was an insult," said one gray-bearded man who was among a group that pressed in to talk.

A girl, studying English at nearby Tehran University, brought no such baggage to the conversation.

"I love the American nation," she said, flashing a thumbs up, "I am happy you are here." Still, she and her friends said, "this is the duty of each Iranian to come and pay tribute" to the sacrifices the country made over the last 20 years, from the revolution that toppled the shah to the hundreds of thousands lost in war with Iraq through most of the 1980s.

CAPTION: Iranian women protest in front of the former U.S. Embassy in Tehran to commemorate the 20th anniversary of its seizure.