Iraq's parliament on Sunday backed a recommendation by the prime minister that all foreign troops should be ordered out after the U.S. killing of a top Iranian military commander and an Iraqi militia leader in Baghdad.
A special session passed a resolution saying that the Shi'ite-led government, which is close to Iran, should cancel its request for assistance from a U.S.-led coalition.
"Despite the internal and external difficulties that we might face, it remains best for Iraq on principle and practically," said caretaker premier Adel Abdul Mahdi, who resigned in November amid street protests.
He later told France's foreign minister that Iraqi officials were working on implementing the resolution.
The session was called after a U.S. drone strike on Friday at Baghdad airport killed Quds Force commander Qassem Soleimani, architect of Iran's drive to extend its influence across the region, and Iraqi militia leader Abu Mahdi al-Muhandis.
Rival Shi'ite Muslim leaders, including ones opposed to Iranian influence, have united since then in calling for the expulsion of U.S. troops, and Abdul Mahdi's eventual successor is almost certain to take the same view.
However, one Sunni Muslim lawmaker said Sunni Arab and Kurdish minorities fear the expulsion of the U.S.-led coalition will leave Iraq vulnerable to an insurgency, undermine security, and further empower its Iranian-backed Shi'ite militias.
Lawmakers from the Iranian-backed Asaib Ahl al-Haq militia, which the U.S. State Department said on Friday it would designate a foreign terrorist organisation, were carrying portraits of Soleimani and Muhandis.
"There is no need for the presence of American forces after defeating Daesh (Islamic State)," Ammar al-Shibli, a Shi'ite lawmaker, said before the session. "We have our own armed forces which are capable of protecting the country."
Despite decades of enmity between Tehran and Washington, Iranian-backed militias and U.S. troops fought on the same side during Iraq's 2014-2017 war against Islamic State militants.
Around 5,000 U.S. troops remain in Iraq, most in an advisory capacity.
Many Iraqis, including opponents of Soleimani, are angry with Washington for killing him and Muhandis on Iraqi soil, potentially dragging their country into another conflict.
The parliamentary resolution was not enough for some Shi'ite leaders, such as the influential cleric Moqtada al-Sadr, whose militia has fought U.S. troops in the past.
"I consider this a weak response, insufficient against American violation of Iraqi sovereignty and regional escalation," Sadr, who leads the largest bloc in parliament, said in a letter to the assembly.
Sadr said the security agreement with the United States should be cancelled immediately, the U.S. embassy shut and U.S. troops expelled in a "humiliating" manner.
The cleric, who says he opposes both U.S. and Iranian interference, seemed to move closer towards Tehran's orbit by allying with his Iranian-backed rivals.
"I call on Iraq's resistance groups and the groups outside Iraq to meet immediately and announce the formation of the International Resistance Legions," he said.
The Iranian-backed Nujaba militia said it was ready to join such an international alliance.
Abdul Mahdi said he had been due to meet Soleimani the day he was killed, and that the general had been due to deliver an Iranian response to a message from Saudi Arabia that Abdul Mahdi had earlier passed to Tehran.
Sunni Muslim Saudi Arabia and Shi'ite Iran, bitter rivals for influence across the Middle East, had been about to "reach a breakthrough over the situation in Iraq and the region", Abdul Mahdi said.
The Trump administration has said Soleimani was planning an imminent attack on Americans.
Abdul Mahdi said the killings would hamper the government's ability to curb the worst impulses of the militias, adding that Muhandis had played a large role in this.
"Before the assassination we had negotiating power and pressure tools in many cases, and now have lost a lot of them."
In the southern city of Nassiriya, at least one anti-government protester was killed and three were wounded when pro-militia protesters carrying symbolic caskets for Soleimani and Muhandis tried to enter their protest camp and shots were fired, police and medical sources said.
The anti-government protesters, like thousands across Iraq, have been demanding an overhaul of the entire political system since October and oppose the militias.
Many of those demonstrators see the political elites as subservient to either the United States or Iran as both try to assert regional influence, and denounce both powers.
In Basra, pro-militia protesters also clashed with anti-government ones and shots were fired, security sources said.