Iraqi Prime Minister Adel Abdul-Madhi lightly chastised the allied government of Iran on Wednesday in a statement rejecting “any violation of its sovereignty” after Tehran launched over a dozen ballistic missiles in the direction of Iraqi military bases.

The bases also housed allied U.S. troops, which Iran claimed to be targeted in revenge for a U.S. airstrike against Qasem Soleimani, the head of the Islamic Revolutionary Guard Corps (IRGC) Quds Force. The IRGC is a U.S.-designated terrorist organization and U.S. officials had evidence Soleimani, already responsible for the deaths of hundreds of Americans, was planning an imminent attack to kill more.

“While Iraq rejects any violation of its sovereignty and attacks on its soil, the government continues its efforts aimed at preventing escalation and for everyone to respect Iraqi sovereignty, for it not to be violated, and for its children not to be put in harm’s way,” Abdul-Mahdi, who resigned in November but remains in power as he has not called elections, said in a post on Facebook, according to a translation by the Kurdish outlet Rudaw.

Abdul-Mahdi’s statement added that Iranian officials warned the Iraqis about the incoming assault to prevent any Iraqi casualties.

“We immediately warned Iraqi military commanders to take the necessary precautions,” he reportedly said.

The prime minister’s spokesman confirmed that Iran reached out to prevent any damage to Baghdad’s interests.

“Shortly after midnight on Wednesday we received a verbal message from the Islamic Republic of Iran that the Iranian response to the assassination of the martyr Qassem Soleimani had started or was about to start,” the spokesman said in a statement, reportedly failing to specify the targets, only that they would be bases that housed Americans.

The prime minister’s office asserted that Abdul-Mahdi “has been making the necessary domestic and external calls in an effort to contain the situation and not enter into an open war, in which Iraq and the region will be the first casualties.”

Rudaw compared this response to the prime minister’s outrage at the death of Soleimani, who had spent the past two months reportedly helping the Iraqi government massacre civilians protesting against Iran’s violation of Iraq’s sovereignty. The airstrike also neutralized Abu Mahdi al-Muhandis, the founder of the Hezbollah Brigades Iraqi guerrilla.

“After their deaths, Abdul-Mahdi issued a forceful statement, in which he condemned the US strike ‘with the utmost degree of condemnation and rejection.'” Rudaw noted. “He had also attended parliament to urge passing a resolution to demand the withdrawal of foreign troops from Iraq and had his foreign ministry file a formal complaint with the United Nations. His statement reacting to Iran’s missile strike was comparatively less severe.”

The Hezbollah Brigades are one of the many paramilitaries that form the Popular Mobilization Forces (PMF), a coalition of mostly pro-Iran, Shiite militias formed in part to fight the Islamic State. Iraq legalized the militias as a formal part of the government’s armed forces during the struggle to liberate the country from the Sunni terrorist organization, so technically the U.S. airstrike killed a senior Iraqi military official.

The militias have for months threatened to kill Americans and end the U.S. presence in the country. Senior Pentagon officials have warned that they are a threat for years, but sent mixed messages also praising the PMF for fighting the Islamic State. PMF fighters have maintained significant influence in Baghdad long before it legalized the forces.

Current tensions with Iran flared after Hezbollah Brigade jihadists attacked a military base in Kirkuk, Iraq – where Kurdish leaders have accused the PMF of ethnic cleansing organized by Qasem Soleimani – in late December, killing a U.S. contractor and injuring four American soldiers. U.S. strikes in response against Hezbollah forces in Iraq prompted a failed PMF invasion of the U.S. embassy in Baghdad. While no injuries were reported, mild damage to the embassy did occur, including vandalism. The pro-Iran mob scribbled “Soleimani is our commander” in spray-paint on the walls of the building.

In less than a week, Soleimani was dead.

Early Wednesday morning, the IRGC confirmed that it had launched a barrage of ballistic missiles in the direction of Iraqi bases housing U.S. troops. The Pentagon confirmed that the missiles did no damage. Iranian state media continues to insist that the missiles killed 80 American troops, offering no evidence save for satellite images showing mild damage of a roof of one of the structures at the Aid al-Assad base.

While reports of the missile attack hit international media outlets, a Ukrainian commercial flight out of Tehran’s airport crashed, killing all passengers on board. The Iranian government immediately blamed mechanical error for the crash, which Ukrainian International Airlines cast doubt on, insisting the plane was one of the best on its fleet and had passed an inspection on Monday. Iran has refused to hand over the plane’s black boxes to Boeing, the plane’s manufacturer.

Follow Frances Martel on Facebook and Twitter.