There is an unpleasant sense of déjà vu in Tehran. In 2001, Iran helped the US oust the Taliban in Afghanistan. But not long thereafter, it was lumped into President Bush's "axis of evil" with Iraq and North Korea for allegedly pursuing nuclear weapons and sponsoring terrorism.
Tehran then remained neutral in the Iraq war, but welcomed Saddam Hussein's overthrow and sealed its border to prevent the escape of senior Iraqi officials.
Even so, increasingly hostile rhetoric emerged from Washington, with the Pentagon talking of covert efforts to "destabilize" the Islamic Republic in the hope of igniting a popular uprising.
It is, according to European diplomats and Iranian analysts, a "very crude" approach that could backfire by encouraging rival factions in Iran to close ranks against an external threat, effectively bolstering the very hard-liners in Tehran Washington hopes to undermine.
Iranian reformers say the best way to counter American threats is to improve the regime's image by ending its chokehold on President Mohammad Khatami's attempts to liberalize the system.
"Responding to America with tough rhetoric is not the answer. The best way to reduce American hostility is to boost the popularity of the system by following Khatami's reform program," says Hossein Alikhani, an Iranian businessman who heads the Center for Global Dialogue, a think tank in Cyprus.
"Saying you're going to destabilize the regime is a mistake because it gives the hard-liners the chance to arrest people, as anything their critics say will be portrayed as supporting the US," Mr. Alikhani says.
Critics of Washington's approach to Iran say it would also be a mistake to champion exiled opposition figures or groups that have little support inside Iran. Influential neoconservatives in Washington are promoting Reza Pahlavi, the son of the late Shah, currently living in Virginia, whose only real base of support among Iranians is in Los Angeles.
Congress, meanwhile, appears to want the Iraq-based Iranian militant opposition group People's Mujahideen removed from the State Department's list of terrorist organizations, prompting Iran to accuse the US of double standards in the war on terror.
The group was given a base in Iraq by Saddam Hussein and was regarded by the coalition as an integral part of Iraq's armed forces. Ordinary Iranians have never forgiven it for fighting alongside Iraqi forces during the devastating eight-year Iran-Iraq war.
"So far the United States' threatening rhetoric against Iran, if anything, has actually benefited the hard-liners, because now they are appealing to the patriotism and religious sentiments of the Iranians," says Sadegh Zibakalam, a professor of politics at Tehran University.
He pointed to the robust speech Wednesday by the country's conservative supreme leader, Ayatollah Ali Khamenei, who gave no indication of taking the US threats seriously and who spoke of the "stupid arrogance of American leaders."
The more aggressive US stance towards Tehran follows accusations that Iran is sheltering senior Al Qaeda members, some of whom American intelligence suspects of being involved in the Riyadh suicide bombings, developing a clandestine nuclear weapons program, and interfering in postwar Iraq. Iran has denied all the charges.
Ratcheting up the pressure on Iran, US Defense Secretary Donald Rumsfeld warned this week that any attempt by Tehran to build an Islamic republic in neighboring Iraq would be quashed. "Iran should be on notice; efforts to try to make Iraq in Iran's image will be aggressively put down," he said.
As after Afghanistan, there were hopes in the wake of the Iraq war of a rapprochement with Washington. Ali Akbar Hashemi Rafsanjani, the country's pragmatic former president who still wields considerable influence, suggested last month that Iran's resumption of ties with the US could be put to a referendum, knowing that polls show a vast majority of Iranians favor ties and trade with the US.
A senior European diplomat in Tehran said: "You can see why the Iranians are comparing it to the situation after Afghanistan. They're saying: 'The Americans get what they want from us, and then call us evil.' "
Despite having sheltered key anti-Saddam groups and wanting the Shiites to be well represented in a postwar Iraqi government, Iran rejects allegations that it is interfering in Iraq by promoting a political role for Iraqi Shiites.
"No Iranian officials have suggested the formation of an Iranian-style government in Iraq," the foreign minister, Kamal Kharazzi, was quoted as saying by an Iranian newspaper last month.
"For a religious regime, nothing is worse than having a religious regime as a neighbor," says one analyst who asked not to be named. "There will be disputes over who is the boss."
EU members share some of Washington's concerns about Iran, including the nuclear issue and Tehran's support for militant groups opposed to Israel and human rights.
Unlike Washington, however, EU countries have diplomatic relations with Iran and believe that the best way of promoting change is by encouraging the reformist supporters of Mr. Khatami. "Whether the American pressure has any positive results will depend on how tactical they are in using it. At the moment, it is very, very crude," the European diplomat says.