Iraq's parliament has passed a resolution calling on the government to expel foreign troops from the country as Iran-US tensions escalate following the killing of a top Iranian military commander and Iraqi armed group leader in a US strike in Baghdad.

In an extraordinary parliamentary session on Sunday, parliament called on the government to end all foreign troop presence in Iraq and to cancel its request for assistance from the US-led coalition which had been working with Baghdad to fight the Islamic State of Iraq and the Levant (ISIL).

"The government commits to revoke its request for assistance from the international coalition fighting Islamic State due to the end of military operations in Iraq and the achievement of victory," the resolution read.

"The Iraqi government must work to end the presence of any foreign troops on Iraqi soil and prohibit them from using its land, airspace or water for any reason."

More:

Parliament resolutions, unlike laws, are non-binding and the move would require new legislation to cancel the existing agreement.

Ahead of the vote, chants of "No, no, America…long live Iraq", rang out inside the hall, before Iraqi Prime Minister Adel Abdul Mahdi also called on parliament to end foreign troop presence.

"Despite the internal and external difficulties that we might face, it remains best for Iraq on principle and practically," said Abdul Mahdi in an address to parliament ahead of the vote.

The embattled prime minister stepped down in November amid months-long mass anti-government protests but remains in a caretaker position.

"Iraq has two options", he said, adding that the country can either immediately end the presence of foreign troops on Iraqi sol or reconsider a draft resolution that ties US presence to training Iraqi security forces in the fight against ISIL.

Abdul Mahdi said that the decline of ISIL, which Baghdad declared victory over in December 2017, put an end to the main reason for the presence of US forces in the country.

"It is in the interests of both Iraq and US to end foreign troop presence in country," he said.

Around 5,000 US troops remain in Iraq, most of them in an advisory capacity. US troops fought alongside Iran-backed Hashd al-Shaabi (Popular Mobilisation Forces or PMF) during 2014 - 2017 against Islamic State group.

Baghdad-based analyst Tareq Harb told Al Jazeera that Abdul Mahdi's call to expel US troops in Iraq was in anticipation of a reaction from the mostly pro-Iran groups which demand such a move.

"Abdul Mahdi had no option but to take a strong stance against the presence of US troops in Iraq," Harb told Al Jazeera. "He's been shrewd in taking this position and leaving the decision to parliament."

Response to US strike

The move comes after Iranian Major-General Soleimani and Iraqi paramilitary commander Abu Mahdi al-Muhandis were killed on Friday near Baghdad's international airport in an air strike ordered by US President Donald Trump.

The attack came just days after hundreds of PMF members and supporters attempted to storm the US embassy in Baghdad, angry at US air attacks against Kataib Hezbollah - a member of the umbrella organisation - positions in Iraq and Syria.

Since the killings, rival Shia political leaders have called for US troops to be expelled from Iraq in an unusual show of unity among factions that have disagreed for months.

Among them was Hadi al-Amiri, the top candidate to succeed Muhandis, who repeated calls for US troops to leave Iraq during a funeral procession on Saturday for those killed in the attack.

Other mourners, most of whom were supporters of the PMF, also called for the same response.

"We want the government to end US presence in Iraq," 24-year-old Ahmed Hassan, told Al Jazeera from the funeral processions in Hurriya Square in central Baghdad on Saturday. "That's the least Iraq can do right now."

'Weak response'

But commenting on the resolution, Iraqi Shia cleric Muqtada al-Sadr said the move fell short of an appropriate response to recent developments in Iraq and called on foreign armed groups to unite.

"I consider this a weak response insufficient against American violation of Iraqi sovereignty and regional escalation," said Sadr, who leads the Sairoon, the largest bloc in parliament.

In a letter to the assembly read out by a supporter, Sadr listed a number of demands including the immediate cancellation of the security agreement with the US, the closure of the US embassy, the expulsion of US troops in a "humiliating manner", and criminalising communication with the US government.

"Finally, I call specifically on the Iraqi resistance groups and the groups outside Iraq more generally to meet immediately and announce the formation of the International Resistance Legions," he said.

Opposition to resolution

While many Iraqis celebrated parliament's move, others were not pleased with the resolution.

Sarkawt Shams, a member of the Kurdish Future bloc in parliament said Abdel Mahdi had deflected responsibility by asking parliament to vote on US presence, adding that many Iraqis were supportive of the motion.

"How can such a sensitive issue be issue be passed onto parliament with half of the country, including Kurds and Sunnis, not wanting this," Shams, who did not attend the session, told Al Jazeera.

Many Sunni and and Kurdish parliamentarians boycotted Sunday's session.

"US troops have been in Iraq at the request of the government. Even though the US has breached this deal, the issue should be resolved through government negotiations, not through parliament," he said.

Ali Muqtadad, a 24-year-old university student told Al Jazeera: "We don't want US troops to leave Iraq. That will only leave a security vacuum and will allow Iran to have increased influence in Iraq which is much more dangerous than US presence.

According to Renad Mansour, head of the Iraq Initiative at Chatham House, the resolution to expel US troops in Iraq was a "politicisation of the response" to the killing of Soleimani and Muhandis.

"Before the strike the Iraqi public wasn't vocally anti-American, but pro-Iranian groups have for years tried to expel US troops.

"This attack has revived anti-Americanism among some Iraqis and given those pro-Iran elements a louder voice in trying to pursue something they were trying to do."