The 2012 American presidential race has been notable for the tough rhetoric from almost all Republican candidates on whether or not to use force against Iran. In the debates they out did each other in pledging their commitment to the defence of Israel against possible Iranian threats, and in promising to never allow Iran to acquire nuclear weapons capability.

As the United States and Israel enter what may be a rush to war to halt Tehran’s nuclear program, it is useful to remember that America has already fought one war with the Islamic Republic of Iran. In the late 1980s, president Ronald Reagan intervened on the side of Baghdad and Saddam Hussein in the Iran-Iraq stalemate, tilting the conflict towards an Iraqi victory. America engaged in a bloody naval and air war against Iran, undeclared of course, while Iraq fought a brutal land war. The lessons of the first war with Iran should be carefully considered before hastily embarking on a second.

Mitt Romney, the presumptive Republican nominee, has been very blunt about Iran. “If we re-elect Barack Obama, Iran will have a nuclear weapon,” he has said. “If you elect me as president, Iran will not have a nuclear weapon.” Romney says Obama’s greatest foreign policy failing has been to not stop Iran’s nuclear program. The former Massachusetts governor is very close to Israeli Prime Minister Benjamin Netanyahu; they have been friends for decades. The implications of Romney’s remarks are that he will be much more willing than Obama to use military force to attack Iran, either by encouraging an Israeli attack or by staging a US one. It is always possible that all of this sabre rattling is just campaign rhetoric, but one should not lightly dismiss it. Campaign rhetoric can become self-fulfilling prophecy.

The Obama administration has been more risk averse on Iran, emphasising engagement, diplomacy and sanctions. Obama inherited two difficult wars in 2008, and while one is now over, the war in Afghanistan will last well into the next presidential term and probably beyond it. Despite this, the President can point to some significant successes. He secured a complete arms embargo and arms ban through the adoption of United Nations Security Council Resolution 1929 in June 2010. This will cripple Iran’s military capabilities indefinitely by denying it access to foreign weapons and technology. Economic sanctions have also been tightened considerably and Obama has not ruled out the use of force in the future. Unlike Romney, Obama and Netanyahu are not close, having clashed repeatedly in the last three years.

In the heat of a presidential campaign it is easy to forget that we already have experience with using force against Iran. President Reagan’s intervention in the Iran-Iraq war is full of useful lessons to bear in mind as the issue of whether or not to use force against Iran again is debated.

The Iran-Iraq War was devastating—one of the largest and longest conventional interstate wars since the Korean conflict ended in 1953. Half a million lives were lost, perhaps another million were injured, and the economic cost was more than $1 trillion. An index of the scale of the tragedy is that the battle lines at the end of the war were almost exactly where they were at the beginning of hostilities. It is also the only war in modern times in which chemical weapons were used on a massive scale.

The 1980-88 war led to other disasters. It led to the Iraqi invasion of Kuwait in 1990, the liberation of Kuwait a year later, and the US invasion of Iraq in 2003. The bloody US war that has just ended in Iraq was the finale in this march of folly. The seeds of multigenerational tragedy were planted in the Iran-Iraq war. We will live with its consequences for decades, perhaps longer.

The first lesson of this earlier war is to expect to be blamed for all that goes wrong. Both Iraqis and Iranians came to believe the US was manipulating them during the war. Ironically, and perhaps naively, the US tried to reach out to both sides during the course of the war—in great secrecy—to try to build a strategic partnership. The disastrous Iran-Contra dealings convinced Iraqis that the Americans were trying to play both sides of the conflict. When the war ended the Iraqi regime and most Iraqis regarded the US as a threat, despite having had Washington’s backing. The US support had included critical intelligence, considerable diplomatic cover, and ignoring the largesse of our Arab allies who loaned tens of billions of dollars to Baghdad to sustain Iraq’s war effort.

Iranians now call the conflict the “imposed war” because they believe the US imposed it on them and orchestrated the global tilt towards Iraq while it lasted. They note that the UN did not condemn Iraq for starting the war—it did not even discuss the war for weeks after it started. Eventually it blamed Iraq as the aggressor only years later as part of a deal to free American hostages held by pro-Iranian terrorists in Lebanon.

Although the war had tragic consequences for Iranians, they nevertheless consolidated their revolution by successfully portraying the battle as a David and Goliath struggle, imposed on Iran by the US and its allies. The Islamic revolution of 1979 was fairly short in duration and its cost was miniscule in comparison to the conflict that was to follow. For the generation of Iranians who are now leading their country, men like President Mahmoud Ahmadinejad and Supreme Leader Ali Khamenei, the war was the defining event of their lives and it has shaped their worldview. Their anti-Americanism and deep suspicion of the West generally can be traced directly to their understanding of the Iran-Iraq War. Expect any future war to make Iran more extreme and more determined to get the bomb.

Another lesson of the first war is that Iran will not be easily intimidated by America. Iran, by 1987, was devastated by the fighting, many of its cities like Abadan had been destroyed, its oil exports were minimal, and its economy was shattered. But it did not hesitate to fight the US Navy in the Gulf and to use asymmetric means to retaliate in Lebanon and elsewhere. Even when the US Navy had sunk most of their fleet, Iran kept fighting and the Iranian people rallied behind Ayatollah Khomeini.

But Iran fought a smart war, avoiding too rapid and too dangerous an escalation. As both the US chairman of the Joint Chiefs of Staff, General Martin E. Dempsey, and his Israeli counterpart, Lieutenant General Benny Gantz, have noted, Iranian behaviour is rational, not suicidal. Tehran will not take steps that endanger the revolution’s survival; they will look to exploit US vulnerabilities in Afghanistan and Bahrain, Israel’s in Lebanon, and the Saudis’ in Yemen.

Ending any future war will be a challenge. In 1988, Iran sued for a cease-fire only after catastrophic defeat on the ground by Iraq and when Saddam was threatening to fire chemical warheads into Iranian cities. Iranians believe they faced a second Hiroshima if they did not accept a truce. Many evacuated Tehran in fear of Iraqi chemical attack. For Khomeini, it was drinking poison to accept a truce. No two wars are identical but we should not expect Iran to back down easily if history is a guide. A few air strikes will not be the end of it.

Finally, be careful to weigh your ally’s advice. Ironically, in the 1980s the closest US partner in the region, Israel, pressed Washington to switch sides and offer assistance to Iran. At the time, Israeli leaders, generals, and spies were obsessed by the Iraqi threat, just as they are preoccupied by the Iranian threat today. They longed to restore the cosy relationship they had with the Shah in the 1960s and 1970s. Israel was the only consistent source of spare parts for the Iranian air force’s US-built jets throughout the war. Israeli leaders, notably Yitzhak Rabin and Shimon Peres, brought considerable pressure to bear on Washington for an American engagement with Tehran. Iran- Contra was in many ways their idea. American diplomats and spies abroad were told to turn a blind eye to Israeli arms deals with Tehran even when it was official US policy to (in the Washington euphemism of the day) “staunch” all avenues by which the Iranians might obtain weapons or other material needed for their war effort.

Many Israeli intelligence officers felt their political leadership was naïve about Khomeini and Iranians and privately voiced their disagreement with the politicians. Today the same is true. Top former officials of the Mossad and the Shin Bet, Israel’s external and internal services, have spoken out publicly, charging that Prime Minister Netanyahu is exaggerating the Iranian threat and understating the dangers of war with Iran. One former Shin Bet director, Yuval Diskin, has charged that the Prime Minister is unfit to lead the nation.

The Arabs also provided a lot of advice to the Reagan administration. Our closest Arab allies, Saudi Arabia, Jordan and Egypt, all urged close support for Iraq in the war. All were certain that Saddam Hussein was no longer an extremist bent of regional domination but rather a leader who could be trusted to support stability in the region. The Saudis, in particular, were shocked by Saddam’s invasion of Kuwait in 1990 and his subsequent moves to threaten the Kingdom.

Of course there are also differences between the first gulf war of 1988 and today. In the late 1980s, the United States was generally at peace. The war in the Persian Gulf was a limited war which did not require large-scale mobilisation of American resources and allowed a single-minded focus on Iran. In 2012, America is already heavily engaged in a war in Afghanistan next door to Iran, along with 40 other allies including Australia. Prudence would dictate caution in opening another military operation so close to the war we are already engaged in.

One hundred and fifty years ago, in the second year of the American Civil War, the Union government was increasingly concerned about British support for the Confederacy. London was considering recognising the Southern rebel government and was turning a blind eye to the construction of warships in English ports for the Confederate Navy. Secretary of state William Seward urged the Lincoln cabinet to declare war on the United Kingdom and invade Canada. President Lincoln wisely cautioned that America should fight one war at a time. His advice remains valid today.

Many Americans have forgotten the lessons of our undeclared Iranian war; we have fought so many others since—in Iraq (twice), Afghanistan, and Libya. It is easy to forget. No Iranian has forgotten.