Iraq has long walked a tightrope between the competing interests of the United States and its neighbour Iran, but the Middle East war is testing this delicate balancing act.
Since the outbreak of war on February 28, after US-Israeli strikes against Iran, strikes have targeted both US interests and pro-Iranian groups in Iraq.
Baghdad has hardened its stance.
On Tuesday, it granted former paramilitary groups and pro-Iran factions within the formal popular mobilisation forces the "right to respond in self defence" to attacks.
But it also promised to prosecute groups targeting US interests.
Can the balance survive as the conflict escalates?
Who Has Struck Who?
Bases hosting the Popular Mobilisation Force (PMF), part of the regular army but containing some pro-Iran factions, have been targeted by air strikes. The PMF has blamed these on the United States and Israel.
Some Iraqi pro-Iran factions, which have a presence within the PMF, have claimed daily attacks on US-linked bases and interests in Iraq and across the region.
And Iran has carried out strikes against Kurdish opposition groups in autonomous northern Iraqi Kurdistan.
Is Iraq's Delicate Balancing Act Wavering?
On Tuesday, authorities said they would summon the US charge d'affaires after a deadly strike targeting the PMF killed 15, and the Iranian ambassador over ballistic missile hits that killed six peshmerga fighters in autonomous Iraqi Kurdistan.
"The government is in a precarious moment where it cannot engage in a conflict with the US, nor can it restrain the Iran-backed 'resistance' factions from launching attacks in the country and beyond," said Tamer Badawi, of the security and defence think tank the Royal United Services Institute.
Granting the former paramilitaries the power to respond is a calibrated act, he said.
Baghdad permits the former paramilitaries to respond, knowing they likely lack sufficient equipment, he said, and promises to prosecute those attacking US interests.
"Neither are really achievable," Badawi said.
Chatham House's Hayder Al-Shakeri said it was harder for Prime Minister Mohammed Shia al-Sudani to sustain a balance between American partnership and Iranian ties.
To do so, he said, "Baghdad needs to reinforce as much as possible the de-escalation."
That could prove difficult when pro-Iran groups are increasingly aggressive, and American strikes are expanding across Iraq.
What Are The American Objectives?
Since the start of the Middle East war, strikes against Iraqi pro-Iran groups have intensified.
The PMF has condemned strikes against a western Iraqi base, where it operates alongside regular soldiers. Fifteen PMF fighters were killed on Tuesday and seven security personnel on Wednesday.
Observers say the objective of the strikes -- thought to be carried out by either the United States or Israel -- is to hinder drone and rocket attacks against Kurdistan and American and foreign troops in Iraq and the region.
"The US has a target list, and it seems like they are hitting leadership and command nodes," said Shakeri, characterising the strategy as one of "decapitation and network fragmentation".
How Do The Factions Fit In?
Around sixty factions make up the PMF, and a handful have a reputation for acting independently.
Washington classifies some as "terrorist" organisations, part of the "Islamic Resistance in Iraq" which has claimed daily attacks on US interests in Iraq and the region.
While the influential Hezbollah Kataeb has temporarily paused attacks against the US embassy, they have called for the withdrawal of American troops deployed with an international anti-jihadist coalition.
The current strikes may weaken the groups, said Shakeri, "but without a proper political strategy and a wider political strategy, it will produce fragmentation and chaos."
Iran has strong military and economic ties with them, Badawi said, and dismantling them required more than air strikes.
The government effort is beyond Iraq's current capabilities, he said, "without risking something that may resemble a civil war."
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Track Latest News Live on NDTV.com and get news updates from India and around the world