BAGHDAD — The Iraqi government is on edge as the Trump presidency enters its final weeks, fearing that a last-minute confrontation between the United States and Iran could erupt on Iraqi soil.

Iraqi Prime Minister Mustafa al-Kadhimi is under pressure from U.S. officials to escalate his government’s crackdown on Iranian-backed militias in Iraq, whose rockets have repeatedly targeted diplomatic and military sites used by Americans over the past year. President Trump has now told his advisers he is prepared to order a devastating response if any Americans are killed in attacks attributed to Iran.

With tensions running high, there are concerns here that provocative actions by either side could spark unintended conflict.

“As a government, I think the Iraqis are just wishing they could close their eyes and have these two months fly by. The potential for escalation is high,” said Sajad Jiyad, an Iraq expert and fellow at the Century Foundation.

Tensions in the region spiked further on Friday after a prominent Iranian nuclear scientist, Mohsen Fakhrizadeh, was killed in an apparent targeted attack in Tehran. Iranian officials implicated Israel in the killing, raising the prospect that Iran or its proxies in the Middle East might retaliate against Western targets.

Ayatollah Ali Khamenei, Iran's supreme leader, promised Nov. 28 to retaliate for the death of Mohsen Fakhrizadeh, the Islamic Republic’s top nuclear scientist. (Reuters)

On Nov. 17, a militia fired rockets toward the U.S. Embassy in Baghdad’s heavily fortified Green Zone, breaching a month-old truce but causing no casualties among Americans or Iraqi security forces.

An armed group identifying itself as Ashab al-Kahf said it had fired the barrage in response to a raid a night before in the city of Fallujah, which led to the arrest of three militiamen. Iraqi security personnel, a senior militia leader, two Western officials and an eyewitness on the street confirmed that the raid took place, although it remains unclear who was detained.

After the rocket attack on the U.S. Embassy, the influential Iranian-backed Kataib Hezbollah group denied involvement and said the truce was still in effect, highlighting apparent divisions in the militia camp and potential threats posed by factions that strike out on their own.

“The fact that this scene is becoming more complicated means that danger is lurking everywhere,” said Jiyad.

The raid in Fallujah came several weeks after the United States intensified its pressure on Kadhimi’s government to bring the Iranian-backed militias to heel, ratcheting up tensions in Iraq.

In calls to Kadhimi and Iraqi President Barham Salih in late September, Secretary of State Mike Pompeo threatened to shutter the U.S. Embassy in Baghdad unless militia rocket attacks were reined in. U.S. officials say that a plan for closing the embassy remains a live possibility, and administration officials have been instructed to prepare for various scenarios.

In a further sign of internal strains in Iraq, at least five anti-government protesters in the southern city of Nasiriyah were killed Saturday in clashes with supporters of a politically powerful Shiite cleric, Moqtada al-Sadr, the Associated Press reported, citing medical officials. The officials spoke on the condition of anonymity in line with regulations.

While U.S. officials have advised Trump against a preemptive strike on Iran, according to a senior official, they say that Trump has described the killing of an American as a red line that would prompt immediate and “crushing” retaliation.

Days after Trump met with his advisers to review possible action against Iran and those discussions were reported by the U.S. media, the head of Iran’s Quds Force, responsible for Tehran’s special operations abroad, visited Baghdad to urge restraint.

Brig. Gen. Ismail Qaani warned affiliated militias and political factions against any escalation of attacks on U.S. targets before Trump leaves office, according to individuals briefed on the matter or present in the meeting. “Trump already lost everything. Just wait for him to be out of the picture,” Qaani said, according to someone present during the conversation.

A spokesman for Kataib Hezbollah insisted that restraint was the best course, especially because the Trump administration is already in the process of withdrawing some U.S. troops from Iraq. U.S. officials said troop levels will be reduced from 3,000 to 2,500 by Jan. 15.

“The U.S. is retreating here. Why would it be in our interests to bomb them?” said Mohammed Mohie, the spokesman.

But the apparent divisions within the militia camp could make it a challenge, even for the most influential of the militias and their Iranian patrons, to maintain calm during this sensitive time.

In a message directed at Qaani following his visit, the leader of the Asaib Ahl al-Haq militia, Qais al-Khazali, said in a TV interview: “The Americans occupy our country, not yours. We will not listen to you anymore because our motives are 100 percent nationalist.” He added, “The truce with the Americans has ended due to its conditions not being met.”

The United States has repeatedly clashed with Iran and its allies on Iraqi territory. In early January, it killed a senior Iranian commander, Maj. Gen. Qasem Soleimani, and Iraqi militia leader Abu Mahdi al-Muhandis in a drone attack near Baghdad’s international airport. In retaliation, Iran fired ballistic missiles at bases hosting U.S. military personnel.

Months later, the United States launched airstrikes on a site it said was linked to Kataib Hezbollah, after blaming the militia for rocket attacks that killed two U.S. servicemen and one Briton on an Iraqi military base north of Baghdad. Citing inadequate intelligence, the British government declined to join that military action.

No Westerners or Iraqi security personnel were killed in the Nov. 17 rocket attack on the U.S. Embassy. But an 18-year-old Iraqi woman was caught in the crossfire, struck by shrapnel outside a popular fairground. As the glowing Ferris wheel kept turning, eyewitnesses said, Zara Othman’s male companion begged for help from passing traffic. “I need a car, someone! She’s bleeding,” he shouts in a video from the night.

“It was tragic to see them like that,” said Bahaa Husein, a street seller outside the park that evening. “It was just a quiet night before the rockets landed, and suddenly we were trapped in someone else’s battle.”

Correction: A previous version of this story misstated the numbers of U.S. and British servicemen — two and one, respectively — who were killed in a March rocket attack on an Iraqi military base north of Baghdad.

Read more: