When the Shah was overthrown by Ayatollah al-Khomeini in February 1979, he started to use anti-US slogans in speeches. The Iranian press used the term "the grand devil" to describe the US, and refused to recognise Israel.
Seven months later the anti-US rhetoric was put into action when hundreds of Iranian students burst into the US embassy in Tehran on November 4 and took about 60 Americans hostage. A number were released shortly afterwards, but most were held for 444 days.
In 1986, Iran-Contra - the biggest US scandal in the 1980s involving secret arms supplies to Iran through Israel, with profits going illegally to Contra rebels fighting to overthrow the democratically elected government in Nicaragua - left many people surprised at Islamic Iran's dealings with the "Zionists" it publicly scorned.
Ali Hussein Bakeer, a Lebanon-based Jordanian political analyst, believes that the Iranian Islamist government did not want to make an enemy of the US - but it had to be seen to do so.
The Shah of Iran, Reza Pahlavi,
was an ally of the US and Israel
"They had to show they were not satisfied with the Shah's foreign relation network, in which the US and Israel had the lion's share," he says.
"The back-door diplomacy started when al-Khomeini came to power, but in order to confirm the revolution's success the new regime had to show hostility to everything the Shah stood by."
The new Iranian government raised the slogan of "liberating Jerusalem" as its final aim, confiscating the Israeli embassy building in Tehran and giving it to the Palestinian Liberation Organisation (PLO) to use as an office.
"The reason they talk a lot about Palestine is just to win the hearts and minds of Arabs and Muslims, otherwise why didn't the Islamic republic say a word about the Muslim Chechens killed by the Russians? And we heard no condemnation about the Muslims who were killed in their thousands at the hands of Serbs," Bakeer says.
Between 1990 and 2003 the US supported and supervised the implementation of sanctions against Iraq, the main deterrent regional force able to counter Iran and the most experienced country in dealing with Iranian forces due to its war with Iran from 1980 to 1988.
The sanctions included a ban on importing and exporting arms and military technology. It was obvious during the 13 years of sanctions that the balance of power in the region was shifting to Iran; however, the US did not act to curb Iran's military advancement.
At the same time, the US succeeded - through the UN - in banning any military technology from reaching Iraq.
Iraq was allowed to build missiles with a range of no more than 150km. Meanwhile, across the border, Iran was testing long-range missiles capable of reaching Israel more than 1,000km away from Iran's western border.
Liqa Makki, an Iraqi political analyst, says: "The US and Israel know the Shia are not a threat to Israel.
"Iraq or Saddam Hussein was much more dangerous than Iran. The US also knows Iran is an opportunist, and its words are far louder than its deeds."
He also makes an extraordinary claim, albeit one that is frequently echoed in the Arab world.
"The friendship between the Iranian Shia Islamic government and US Republicans dates back decades," he says.
"When the US hostages were taken in 1979, the Iranians agreed with the then Republican candidate, Ronald Reagan, not to release the hostages in order to ensure their victory against the then Democratic US president, Jimmy Carter.
"The hostages were released on 20 January 1980 just after Reagan won the elections."
When the government of Saddam Hussein was overthrown in the 2003 US-led invasion, America did not mind Iran's key role - via its huge influence with or control of Shia parties in Iraq - in drawing Iraq's new political map. This aroused suspicions about the real nature of relations between the US and Iran.
Iraqi politicians backed by Iran - such as Ibrahim al-Jaafari, the erstwhile interim prime minister, Jalal Talabani, the president, Abd al-Aziz al-Hakim, the leader of the Iraqi United Alliance list, the biggest bloc in the parliament - and many others have dominated the scene in Iraq and have held close ties with the US army and officials in Iraq.
Iranian-backed figures dominate
the political scene in Iraq
Makki says: "The recent nomination of Iraq's new prime minister is just another example of US-Iranian mutual interests.
"The US broke our heads with its objection to al-Jaafari, then Bush feels that the US has become safer by the nomination of the second man in al-Jaafari's party.
"What is the difference between the two? Nothing. What is the common factor? Their close ties with Iran."
The duel between the US and Iran over the latter's nuclear programme has not affected their ties in Iraq, and has not affected Iranian-backed politicians in Iraq.
Moreover, the intended US-Iran talks over Iraq have just added more ambiguity as to why Iraq is the only issue that Iran and the US can talk about, and not Iran's nuclear programme.
Legitimising the occupation
Sheikh Harith al-Dari, chairman of Iraq's highest Sunni body, the Association of Muslim Scholars, said the Iranians are giving more legitimacy to the US occupation by sitting with them to talk about Iraq.
"What we know is Iran and the US have endless problems between them. Why, when it comes to Iraq, are they willing to sit and talk? Why don't they leave Iraqi affairs for Iraqis and sit with the Americans to solve their [Iran's] problems with them?" he says.
"We wonder what they will talk about, and we really would like to know in what capacity the Iranians will sit with the Americans to talk about Iraq."
Keeping up appearances
However, Iranian officials have outwardly been maintaining the same anti-West tone they adopted since their Islamic revolution in 1979.
Ayatollah Mohammad Taghi Mesbah-Yazdi, a powerful cleric seen as the ideological and spiritual godfather of Mahmoud Ahmadinejad, the Iranian president, believes that there is an international conspiracy against the country's government.
Hojatoleslam Mohsen Gharavian, another leading cleric, says: "The most important challenges for the regime are the policies of the United States and the Europeans. They are trying to make trouble for us. They are trying to topple our regime.
"We believe the US and European nations want to see a regime in Tehran which is subordinate to their wishes and which obeys their economic and political commands."