On the outskirts of Tehran, vast cemeteries serve as a grim reminder of the high price Iran paid during its 1980-88 war with Iraq. Hundreds of thousands of young Iranians fought and died in a horrific struggle against Saddam Hussein’s invasion forces, which were armed by the US. Among those Iranian soldiers who survived was Qassem Suleimani.

The war, by all accounts, was a formative experience for the man who would later rise to a dominant position in Iran’s military, security and intelligence establishment. Suleimani’s loyalty to Iran’s revolutionary regime, which seized power in 1979, was firmly established. His belief that an implacable America was his country’s foremost foe was written in blood.

Suleimani became the chief architect of the expansion of Iran’s regional influence, which began in earnest following the American toppling of Saddam in 2003. It enabled Tehran to establish the kind of dominance in Iraq that previously eluded it. Iran’s reach gradually extended to Syria, Gaza, Lebanon and Yemen, always in opposition to the US and its allies.

Play Video 0:35 Qassem Suleimani: moment Iranian general killed by US strike reportedly caught on CCTV – video

This history of relentless confrontation with Washington is Suleimani’s legacy, and will ultimately dictate how Iran responds to his assassination on Friday on Donald Trump’s orders. The suggestion by some analysts in Washington that a shocked and weakened Iran may back down merely shows how little most Americans understand the country.

The killing will be viewed by many inside Iran, and among its Shia regional allies, as an act of war, and Suleimani as a martyr whose violent death must be avenged in kind. Ayatollah Ali Khamenei, Iran’s supreme leader, and Mohammad Javad Zarif, its foreign minister, have already indicated as much. They will use the assassination to rally wavering support for the regime.

There can be little doubt: Iran will hit back hard, at a time and place of its choosing, and possibly on multiple fronts.

As Donald Rumsfeld, the Iraq war-era US defence secretary, might have put it, American bases and interests across the Middle East comprise a “target-rich environment”. If Iran’s armed forces were to launch head-on, all-out military retaliation, the big US base in Bahrain, home to US naval forces central command and the US Fifth Fleet, would be an obvious choice.

But given past practice, such a direct, undisguised attack on the US itself seems unlikely. American allies and facilities are a different matter. Across the Gulf theatre as a whole, Iran has numerous choices. It could strike Saudi or UAE oil production and export centres, as it successfully did last autumn using missiles and drones. It could blockade the Strait of Hormuz, at the mouth of the Gulf, to cause an international oil shock and trigger global economic disruption.

Play Video 1:37 Aftermath of US airstrike that killed top Iranian general Qassem Suleimani – video report

Israel’s government and military chiefs have particular cause for concern. Thanks to Suleimani, Iran has established Shia proxy forces, military bases and missile batteries on Syrian soil, within easy firing range of Israeli cities. Accusing Iran of ordering rocket attacks, Benjamin Netanyahu, Israel’s prime minister, repeatedly launched pre-emptive and retaliatory air strikes last year inside Syria and Iraq.

In the view of Tehran hardliners, who currently hold the political ascendancy, the Israeli state is an illegitimate arm of the “Great Satan” – and equally deserving of oblivion. They will also be keenly aware that Israel is in the midst of a divisive political crisis. The temptation to vent their wrath vicariously on a despised enemy that Trump has showered with political favours may prove irresistible.

If such military retaliation happens, it could come via Lebanon, where Hezbollah, Iran’s Shia ally and Israel’s avowed foe, wields significant influence. The group’s leadership has eschewed renewed conflict in recent years. But it is reportedly armed to the teeth with increasingly sophisticated, Iranian-made guided missiles. The war of 2006, when it fought Israel to a bloody standstill, is not forgotten.

Iraq, where the government and Shia leaders have expressed anger and dismay at Suleimani’s death, could provide another setting for an Iranian vendetta. The US embassy in Baghdad became the target of pro-Iranian militias at the end of December. US bases in Iraq and Syria, where about 5,000 troops are currently deployed, have been attacked by proxy forces in the recent past, and could be again.

Iran’s security chiefs may opt for yet more devious methods, including sabotage, covert destabilisation operations, the mining or seizure of oil tankers, and deniable drone attacks, hostage-taking or truck bombings akin to the infamous 1983 attack on a barracks in Lebanon that killed nearly 250 US soldiers and was blamed on Hezbollah.

Washington’s other allies and partners in Europe and the region, notably Saudi Arabia and the UAE, also have cause for nervousness. They do not appear to have been consulted in advance about Trump’s kill order. Fearing attack, the easily panicked Saudis, bristling with advanced US weaponry, could be drawn into pre-emptive action against Iran that escalates and widens conflict.

Boris Johnson’s government, which has adopted an increasingly hawkish, pro-Trump stance towards Iran, will need to be on its guard, too, if it wants to avoid being sucked in. If the crisis deepens, Trump will expect Britain’s backing, whatever parliament or the public thinks.

Yet Johnson and his foreign secretary, Dominic Raab, are gaffe-prone, too much in need of Trump’s favours, and dangerously inexperienced. What would they do, for example, if the British naval base in Bahrain were attacked or more British ships in the Gulf seized or sunk?

Iran has an alternative range of political tools that could be deployed against its arch-foe. It is likely it will try to channel Iraqi anger over the use of its territory for the assassination of Suleimani and leading Iraqi militiamen into a concerted bid to push US forces, diplomats and contractors out of Iraq altogether. Recent Iraqi street protests against Iran’s overweening influence may now be eclipsed by a bigger struggle against the US and its much-resented importunities.

Nor is Iran without important friends. It will appeal to China and Russia for political and diplomatic support in any conflict – and it is likely to get it. Tehran is already cooperating closely with Russia’s leader, Vladimir Putin, in Syria, where both back the regime of Bashar al-Assad. In common with other countries, Moscow will worry about the impact the killing may have on the joint fight against Islamic State and jihadist terrorism. Meanwhile, Turkey, which is already at odds with Washington and is an ally of Iran in Syria, will not welcome more destabilising conflict along its southern and eastern borders.

Like Russia, China has no obvious reason to assist Trump, whose damaging “maximum pressure” sanctions campaign against Iran mirrors similar measures he has imposed on them. Both oppose American overseas military interventions of any kind, on principle. And both have stubbornly maintained ties with Tehran. China continued to buy Iran’s oil in defiance of the US embargo.

Iran has diplomatic and legal options, too – at least in theory. Trump’s action in brazenly ordering the murder of a senior foreign government official on foreign soil makes a mockery of international law as well as Congress’s War Powers Act. The matter could be taken up at the UN security council, as well as in domestic American, Iranian and Iraqi courts.

But such relatively rational behaviour is not to be expected from either party in the short term. The US-Iran confrontation, which began in 1979 and has dramatically worsened since Trump reneged on the UN-backed Iran nuclear deal in 2018, has moved into a new, more dangerous phase – and could quickly get out of hand.

Right now, everyone is asking: what will Iran do? But the bigger question is: what’s Trump’s plan if Iran hits back hard and it all goes to hell?