Dozens of attacks on US military facilities by Iran-backed factions in Iraq over the past two months have forced the government in Baghdad to perform a balancing act that is becoming more difficult by the day.
Since the Hamas attacked Israel on October 7, Iran-backed groups have carried out at least 84 attacks against US troops in Iraq and Syria. The fighting between the two sides has led to fears of a wider regional conflict.
Dozens of attacks on US military facilities by Iran-backed factions in Iraq over the past two months have forced the government in Baghdad to perform a balancing act that is becoming more difficult by the day.
A rocket attack on the sprawling US Embassy in Baghdad on Friday marked a further escalation as Iraqi officials scramble to contain the ripple effects of the Israel-Hamas war.
Iran holds considerable sway in Iraq and a coalition of Iran-backed groups brought Iraqi Prime Minister Mohammed Shia al-Sudani to power in October 2022. But at the same time, there are some 2,000 US forces stationed in Iraq under an agreement with Baghdad, mainly to counter the extremist Islamic State group.
Baghdad also relies heavily on Washington's sanctions waivers to buy electricity from Iran, and since the US invasion of Iraq in 2003, Iraq's foreign currency reserves have been housed at the US Federal Reserve, giving the Americans significant control over Iraq's supply of dollars.
Al-Sudani's predecessors also had to walk a delicate line between Tehran and Washington, but the Israel-Hamas war has considerably upped the stakes.
Since the onset of the war on October 7, at least 84 attacks on US bases in Iraq and Syria have been claimed by an umbrella group of Iran-backed Iraqi militants dubbed the Islamic Resistance in Iraq. The militants say their attacks are in retaliation for Washington's backing of Israel and its military presence in Iraq and Syria.
Al-Sudani has condemned the attacks and US counter-strikes as a violation of his country's sovereignty. He also ordered authorities to pursue militants involved in the attacks, most of which did not cause injuries or major damage. His office declined further comment.
Washington has sent messages that its patience is wearing thin.
After the embassy attack, the Pentagon said that Defence Secretary Lloyd Austin “made clear (to al-Sudani) that attacks against US forces must stop”.
US Secretary of State Antony Blinken told al-Sudani that Washington expects Iraqi officials to take more action to prevent such attacks, and believes they have the capability to do so, a US official told The Associated Press.
During a recent trip to the region, CIA Director William Burns warned al-Sudani of “harsh consequences” if Iraq does not act to stop the attacks, an Iraqi official said.
The two officials spoke on condition of anonymity in line with briefing regulations.
In a call with the Iraqi premier earlier this month, Blinken said that the Americans would take matters into their own hands, arguing that Baghdad had not done enough to pursue the perpetrators, according to two Iraqi officials who spoke on condition of anonymity because they were not authorized to comment publicly.
Two days later, a US strike on a drone launch site near the Iraqi city of Kirkuk killed five militants.
The US and much of the international community have scrambled to prevent the war in the besieged Gaza Strip from expanding across the region.
Analyst Renad Mansour said he believes Iran is making sure the attacks remain below a threshold that would provoke a major US response.
“Both Iran and Iraq have maintained thus far a clear line that, at the moment, Iraq cannot turn into a playground that could destabilise the Sudani government,” said Mansour, a senior research fellow at the Chatham House think tank.
He said that's partially due to Iraq's role of passing messages between Washington and Tehran.
Sometimes the messenger is al-Sudani.
In early November, Blinken met with al-Sudani in Baghdad a day before the Iraqi prime minister was set to visit Tehran. Al-Sudani had won a specific promise from the militias that no attacks would be launched during Blinken's visit, according to an Iraqi official and a member of the Kataib Hezbollah militia. Following the visit, al-Sudani carried a message from Blinken to Iran to restrain the militias.
Both officials spoke on condition of anonymity because they were not authorized to comment publicly.
A week after the Iraqi premier's diplomatic efforts, the United States extended Iraq's sanctions waiver by four months to purchase Iranian electricity. Iran-hawks in Washington criticized the move, saying it would shore up revenue for Tehran while its proxies are at war with Israel.
Mansour says the US has used the sanctions waiver as “one of its cards” in economy-centred efforts to pressure Iran and Iraq.
Unlike Lebanon's Hezbollah group, seen as Iran's most powerful proxy in the region, Iraq's militias have so far only played a limited role in the conflict.
For now, only small number of militiamen from Iraq are in southern Lebanon, near Israel's northern border, said the official from the Kataib Hezbollah group. He said the Iraqis are working on “battle management” alongside Hezbollah and representatives of Hamas, the militant group that has ruled Gaza for 16 years and is currently battling Israel.
He said the Iran-backed groups in Iraq do not want the conflict to spread across the region, but are prepared to respond with force to any attacks.
Should Iran and allies choose to escalate, al-Sudani's government will likely be unable to rein them in or prevent consequences on Iraqi soil, said Iyad al-Anbar, a political science professor at Baghdad University.
“And this is why all al-Sudani has been able to do is try to bring some calm through statements,” said al-Anbar.