Iran's missile attack on Iraqi military bases hosting US troops has raised questions over Iraq's sovereignty and reflected Tehran's deep-rooted influence over Baghdad.

Iran fired more than a dozen missiles at two Iraqi military bases early on Wednesday morning. The US Pentagon confirmed that the missiles hit the Ain al-Assad airbase in Anbar Province and a facility near Erbil's airport in northern Iraq.

The missile attacks were in retaliation for the killing of Iranian General Qassem Soleimani, leader of Iran's Islamic Revolutionary Guard Corp's (IRGC) Quds Force.

He was killed by a US air attack near Baghdad airport last week, alongside Iraqi paramilitary commander Abu Mahdi al-Muhandis.

More:

Iraqi President Barham Salih's office issued a statement on Wednesday to condemn Iran's missile attack for taking place "on Iraqi soil". He also denounced Tehran's "repeated violation of Iraqi sovereignty and its transformation of Iraq into a battlefield for confrontation between belligerent parties".

Iraq's Speaker of Parliament Mohamed al-Halbousi issued a statement to "condemn Iran's violation of Iraqi sovereignty and express complete rejection of transforming Iraq into a spectre for settling scores".

Al-Halbousi's statement also called on his government to take the necessary measures to end the "assault" on Iraq, adding that the country should be left out of confrontations between Washington and Tehran.

Following Iran's attack on the bases, Iraq's caretaker Prime Minister Adel Abdul Mahdi said he was alerted by Iran that its response to Soleimani's assassination was either imminent or under way, according to his spokesman.

'Like the US'

The statements by both officials reflected increasing anger across Iraq following the early morning attack.

Many Iraqis called it a "stark violation of Iraqi sovereignty" and compared it to the US strike that killed Soleimani.

"The strikes were definitely a violation of our sovereignty," 24-year-old Rayyan al-Jaaf told Al Jazeera. "What Iran did was the same as the US when it launched a missile in Baghdad to kill Soleimani.

"Both were assaults on Iraq, yet the government has been mostly silent," he added.

200108071201927

Sarkawt Shams, member of the Kurdish Future bloc in the Iraqi parliament, agreed.

"Iran's actions on Iraqi soil should be condemned just like the US airstrikes were," Shams told Al Jazeera.

Following the assassination of Soleimani and Muhandis, Iraq's Prime Minister Abdul Mahdi condemned the move in a strongly worded statement in parliament.

In an extraordinary session, parliamentarians responded to the incident by passing a resolution that urged the government to end all foreign-troop presence in the country and cancel its request for assistance from the US-led coalition.

Anti-Iran sentiment

For other Iraqis, the move reflected Tehran's deep influence on the Iraqi government, something that is denounced by many protesters who have taken to the streets since early October to demand a complete overhaul of the political system.

إيران وأميركا وغيرها لم ينتهكوا السيادة العراقية!

من أنتهك السيادة العراقية اولاً هو الحكومة منبطحة برئيس مجلس وزراءها ورئيس جمهورية غير صالح وبرلمان لا يمثل الشعب

السيادة بتغيير كامل المنظومة السياسية تعُيد لنا سيادتنا. لذلك خرجنا #نريد_وطن وسنستعيد الوطن من اللصوص



ننتظركم 10-1 — Hamzoz 🇮🇶 حمزوز (@Hamzoz) January 8, 2020

Translation: Iran, the US and others aren't the ones violating our sovereignty. It's the Iraqi government first and foremost that has violated Iraqi sovereignty. It's an incompetent prime minister and president and a parliament that does not represent us. Our sovereignty can only be restored by a complete overhaul to the political system. #We_demand_a_homeland

"If Iraq were a country like any other, our government would have responded more strongly," said Mustafa Ibrahim, a 28-year-old protester in Baghdad's Tahrir Square.

"But Baghdad doesn't react when it comes to Iran, because it belongs to Tehran."

In strong expressions of anti-Iranian sentiment since the protest movement began, protesters stormed the Iranian consulate in the city of Najaf on November 29, bringing down the Iranian flag and replacing it with the flag of Iraq.

Earlier that month, videos shared on social media showed Iraqi demonstrators striking images of Iran's Supreme Leader Ayatollah Ali Khamenei and Quds Force leader Soleimani.

Pro-Iran groups

But pro-Iran groups and members of the Hashd al-Shaabi (Popular Mobilisation Forces or PMF), an umbrella organisation of mostly Iran-backed Shia armed groups, saw the attack on Iraqi soil as unproblematic.

"We have to avenge Soleimani and Muhandis," 29-year-old Amr al-Tamimy, who described himself as a member of the PMF, told Al Jazeera.

"Both of them sacrificed a lot for the sake of Iraq and worked to protect and secure Syria and Lebanon. So what if it [taking revenge] was done on Iraqi soil?"

Muhandis, whose real name was Jamal Jaafar Ibrahimi, was the top Iraqi adviser to Soleimani, founder of the Kataib Hezbollah armed group and de facto leader of the PMF.

Muhandis fought alongside Soleimani, who was charged with extending Iran's military influence beyond its borders.

Along with other prominent Iraqi armed group leaders, including Badr Organisation, led by Hadi al-Amiri, they fought on Iran's side in the 1980-88 Iran-Iraq war.