The death of General Qassem Soleimani brought the US and Iran desperately close to war. Photo / File
For now, US President Donald Trump appears to have pulled off his high-stakes gamble to kill Tehran's most powerful military commander without triggering a full-blown war with Iran.
But the Middle East remains dangerously on edge and analysts warn that the US will struggle to deal with the longer-term falloutof the assassination as it further empowers Iranian hardliners and Tehran's militant proxies.
Both Tehran and Washington seemed to take calculated decisions to de-escalate after Iran fired more than a dozen missiles at American forces in Iraq in retaliation for the US's assassination of Qassem Soleimani in Baghdad last week.
The Iranian strikes caused no casualties and Tehran told the US through at least two back channels and in public statements that it was not considering a further military response.
A former senior US military commander said the Trump administration had re-established deterrence "for now". But he cautioned that other factors will influence what happens next, amid fears that Iran and its allies will only become more aggressive in their pushback against the US.
The Islamic regime is renowned for taking strategic long-term decisions and has spent decades building a network of allied militias throughout the region to exert its influence and counter its foes. As head of the elite Revolutionary Guards overseas wing, the Quds force, Soleimani ran the network and steered regional policy.
The killing of such a high profile and influential commander was a stunning blow to the regime. But his death is only likely to reinforce Iranian leaders' conviction that the role of its proxies is more important than ever as Tehran vows to drive US forces from the region.
"The strategic intent of Iran will remain intact," said John Raine, a former British diplomat and senior adviser at the International Institute for Strategic Studies. "There's a strong chance that out of both practical considerations and tribute to Soleimani, Tehran doubles-down on what was the Soleimani doctrine and we see more of all the activities of partners and so on."
In contrast, he said that there was a greater chance of "strategic diversion" on the US side, including the threat that Iran and the factions it backs make Iraq an environment in which the US cannot operate.
There are already signs in Iraq that the US's killing of Soleimani, as well as a senior Iraqi militia commander, will lead to gains for Tehran and further weaken Washington's diminishing influence. At the weekend, pro-Iranian Iraqi factions — which were being challenged by weeks of popular protests — claimed a victory when MPs voted to order the 5,000 US troops from the country.
Prime minister Adel Abdul Mahdi backed a resolution, and while it is unclear how his caretaker government will proceed, the presence of American forces in Iraq looks increasingly tenuous. Some Iraqis and analysts, meanwhile, fear the emboldened pro-Iranian militias will now seek to crush the protest movement, dashing any hopes of reform that may have diluted Iran's influence.
Another former senior defence official said the Pentagon leadership was initially caught off-guard by the strength of hostility to the Soleimani's killing in Iraq. "I don't think they grasped this could lead to the end of US troops in Iraq," said the former official.
In Iran, the mass outpouring of grief as millions poured on to the streets for Soleimani's four-day funeral procession provided a rare show of unity in the republic and a boost for a regime that has been under months of intense US pressure.
"This massive show has given popular legitimacy to our regional policies which means we have to go for a bigger goal of kicking the US out of the Middle East," said a regime insider in Tehran. "You have to be either crazy to attack the US military base or have strong backing. If people had not shown up during the funeral in unprecedented numbers, [Iran] would not have fired missiles."
Mr Raine said Washington "probably underestimated how this would ricochet inside Iran and outside".
"While there is not a lot of love lost between Iran and many Arab states, there will be a lot of deep misgivings in the Gulf that the escalation reached a point beyond comfortable, and therefore those regimes will be very careful about how they associate themselves with this level of [US] aggression."
However, the regime's image would be severely damaged if western suspicions that a Ukrainian passenger jet, which crashed shortly after taking off from Tehran airport hours after Iran launched the attack on US forces, was mistakenly hit by a missile is proven. More than 170 people died in the crash.
Much now depends on how Tehran utilises proxies in Iraq, Lebanon, Syria and Yemen. Mike Pompeo, US secretary of state, has warned that the US will hold Tehran directly responsible for any attack by regional militants. A senior western diplomat said there was a risk the effort to de-escalate "could be derailed by rogue guards".
"When Iran gets punched in the nose they pull back; they are aggressive when we are not aggressive enough," said the former official. "The Iranians had concluded that Trump was more bark than bite . . . but now they are saying how do we avoid putting ourselves in the position where he does something else."
Senior Trump administration officials are also trying to tease out potential interlocutors in the Iranian regime, with the long-term hope that Washington can influence events in Tehran in their favour for when Ayatollah Ali Khamenei, the 80-year-old supreme leader, passes on.
But for now there appears no end to the hostilities. "We need a direct channel to the Iranians," said Nicholas Burns, a former senior state department official. "It's too early to say if he's got away with it. There's so much that can go wrong."
Written by: Katrina Manson, Najmeh Bozorgmehr and Andrew England