US President Donald Trump’s decision to assassinate Gen Qasem Soleimani, the head of Iran’s Quds Force, has set off a chain of consequences.
One of the first was on the unfinished war against jihadists.
Almost immediately the US-led coalition fighting the Islamic State group suspended operations in Iraq. The US and their allies announced that their main job was now defending themselves.
From a military point of view, probably they had no choice.
Iran and the militias it sponsors here in Iraq have sworn vengeance for the killings caused by the missile fired by a US drone at Soleimani’s vehicle as it left Baghdad airport on Friday.
That puts US forces in Iraq, and those from Western allies working alongside them, squarely in the firing line.
It is also very good for IS, and will speed up its recovery from the blows it took when its “caliphate” was smashed.
It is also good news for the extremists that the Iraqi parliament passed a motion demanding an immediate American withdrawal from the entire country.
IS has been grimly resilient over many years. It regenerated itself from the ruins of an earlier group, al-Qaeda in Iraq.
A big military operation in 2016 and 2017 was needed to end IS control of territory straddling Iraq and Syria.
Many jihadist fighters ended up dead or in prison. But that did not kill the organisation.
It is still active in its old stamping grounds in Iraq and Syria, mounting ambushes, extorting funds, and ending more lives.
The Iraqi state has effective elite army and police units, mainly trained by the Americans and European allies who joined the fight against IS.
Since Soleimani’s assassination, the US has suspended training as well as operations. So have Denmark and Germany.
The Germans are pulling military trainers out to Jordan and Kuwait.
Iraqi forces take most of the risks on the ground in operations against IS. But as well as training, they have relied on vital logistical help from US forces, who are now hunkering down in their bases.
Now, the Iran-backed groups have been absorbed into the Iraqi military under an umbrella organisation called the Popular Mobilisation. The most prominent militia leaders have become powerful political leaders.
In the years after 2014, the US and the militias faced the same enemy. But the Shia militias now look certain to return to their roots, which lie in the fight against the US-led occupation after the 2003 invasion.
They killed many American soldiers – helped by training and better weapons supplied by Soleimani – which was one of the reasons that President Trump gave for ordering the attack last week.
Since Mr Trump unilaterally pulled out of the Iran nuclear agreement in 2018, the Americans and the Iranians have been spiralling down towards the edge of war.
Before Soleimani was killed the Shia militias were already going back to targeting the Americans.
An attack in late December on a base in northern Iraq that killed a US contractor was answered by air strikes that killed at least 25 fighters from a group called Kataib Hezbollah.
Their leader, Abu Mahdi al-Muhandis, met Soleimani at Baghdad’s airport and was blown to pieces alongside him in the same car.
History has shown that jihadist extremists thrive most when they can take advantage of instability, chaos, and weakened, divided enemies.
That has happened before and there is a strong chance it will happen again.
BBC