With war drums beating louder, senior military commanders in Tehran miss few opportunities to warn the government against plunging the country into an unequal fight with the United States and its allies.
One such warning came last month from the Commander of the Islamic Revolutionary Guard (IRCG) General Rahim Safavi.
In an unusually frank assessment of the situation, he told an audience of guardsmen that the country lacked the necessary means to defend its extensive land and sea borders. He insisted that everything be done to avoid an "unhappy episode".
In Tehran's military circles, the phrase "unhappy episode" is a codeword for the only direct military clash that has so far taken place between the Islamic Republic and the United States.
The clash came on April 18, 1988, exactly 19 years ago today.
At the time, the Islamic Republic censored all news of the event so that most Iranians do not even know that it happened at all. For their part, the Americans also "managed" the flow of information about the clash to prevent its strategic importance from becoming apparent at the time.
Nevertheless, the clash between the navy of the Islamic Republic and a US naval task force led by the aircraft carrier USS Enterprise, was subsequently classed as one of the five naval battles of historic importance that established American sup-remacy at sea.
The background to the clash was rather complicated.
At the time, the Islamic Republic was at war against Iraq under Saddam Hussain, rejecting United Nations pleas for a ceasefire.
Towards the end of 1987, the Islamic Republic started firing on Kuwaiti oil tankers passing through the Gulf on the grounds that Arab oil money fuelled Saddam's war machine. Weeks of efforts by the UN, the Arab League, the Organisation of Islamic Conference (OIC), and the nonaligned bloc to persuade Tehran to stop attacking Kuwaiti tankers produced no results.
It was then that President Ronald Reagan decided to put the Kuwaiti tankers under the US flag and escort them through the waterway.
The Islamic Republic retaliated by mining some of the shipping lanes in the waterway. On April 14, 1988, the USS Samuel B. Roberts struck a mine and was seriously damaged. It was towed to Dubai where it arrived two days later.
The following day experts established that the mine had been made in Iran and placed by the IRCG.
Within hours, President Ronald Reagan ordered the US task force to retaliate. The IRCG responded by firing missiles at US vessels without inflicting any harm.
The US task force seized the opportunity to unleash its superior firepower to virtually break the Iranian navy.
The Americans lost two men, the crew of a helicopter that came down in an accident far from the battle.
The IRCG lost 87 men and over 300 wounded. Later, the Islamic Republic filed a suit against the US at the International Court at The Hague claiming losses amounting to several billion dollars. (The court rejected Tehran's suit in November 2003.)
The battle's effect in Tehran was immediate.
Ayatollah Ruhollah Khomeini, then the leader of the Islamic Republic, was initially inclined to retaliate by ordering Hezbollah to carry out suicide attacks against American and other Western interests.
However, he was persuaded by Hashemi Rafsanjani, then the ayatollah's closest aide, to take a deep breath and maintain a low profile. There was to be no retaliation. The remaining vessels of the Iranian navy were ordered to clear their movements with the US task force in advance to avoid any misunderstanding.
The battle, nicknamed by the US "Operation Praying Mantis", was followed in July by a tragic accident when the USS Vincennes shot down an Iran Air jetliner by mistake, killing all 290 passengers and crew.
Khomeini interpreted the accident as a deliberate escalation by the US and feared that his regime was in danger. Rafsanjani and other advisers used that fear to persuade the ayatollah to end the war with Iraq, something he had adamantly refused for eight years.
A broken Khomeini appeared on TV to announce that he was "drinking the chalice of poison" by accepting a UN-ordered ceasefire. He was no longer going to Karbala on his way to Jerusalem.
In his memoirs, Rafsanjani makes it clear that without the disastrous naval battle and the downing of the Iran Air jet, Khomeini would not have agreed to end a war that had already claimed a million Iranian and Iraqi lives.
The reason was that Khomeini was leader of a regime that lacked adequate mechanisms for self-restraint. He was the driver of a vehicle with no clutch or reverse-gear, let alone a brake, and thus was doomed to speed ahead until it hit something hard.
Interestingly, President Mahmoud Ahmadinejad used a similar image recently when he committed the regime to a no-compromise position on the nuclear issue. "This train has no reverse-gear and no brakes," he said.
Khomeini could have ended the war with Iraq years earlier, obtaining decent terms for Iran. He did not because the extremist nature of his regime made it impossible to even contemplate the fact that realism, prudence and compromise are key elements of good leadership.
Khomeini could not have ended the war. He needed Reagan to do it for him. If the Islamic Republic is a train without a reverse-gear and brakes, it does not need a conductor. It could race ahead until it hits something hard on its way.
Amir Taheri is an Iranian writer based in Europe