Iraqi MPs have passed a resolution calling for foreign troops to leave the country after the US killed top Iranian general Qasem Soleimani in a drone strike at Baghdad airport last week.
Parliament also called for a formal complaint to be made at the UN about US "violations" of Iraqi sovereignty.
Some 5,000 US soldiers are in Iraq as part of the international coalition against the Islamic State (IS) group.
The coalition paused operations against IS in Iraq just before Sunday's vote.
It said it was doing so to enable its forces to concentrate on protecting US, UK and other troops at bases in Iraq.
Soleimani's killing marks a major escalation in tensions between Washington and Tehran.
Under his leadership, Iran had bolstered Hezbollah in Lebanon and other pro-Iranian militant groups, expanded its military presence in Iraq and Syria, and orchestrated Syria's offensive against rebel groups in the country's long civil war.
What impact is the killing having on Iraq?
Iraq finds itself in a difficult position as an ally both of neighbouring Iran, which is demanding revenge for Soleimani's assassination on Iraqi soil, and of the US. The Baghdad government sees the killing of Soleimani as a violation of the terms of the coalition's presence.
Meanwhile, there are concerns that parts of Iraq's population sympathetic to Iran have been alienated by the killing, and that pro-Iranian militant groups may seek revenge.
Thousands of Iraqis attended a funeral procession for Soleimani on Saturday before his body was flown to Iran.
The non-binding resolution was passed by the Iraqi parliament after caretaker Prime Minister Adel Abdul Mahdi called for an end to the foreign military presence in a speech to MPs.
- Calls on the government to revoke its request for assistance from the international coalition fighting IS due to "the end of military operations in Iraq and the achievement of victory"
- Says "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"
- Tells the government to file a formal complaint to the UN against the US "for its serious violations and breaches of Iraqi sovereignty and security"
Ahead of the vote, the prime minister said the US military presence in the country should be ended as soon as possible to reorganise "healthier and correct relationships with the US and the rest of the states".
How was Soleimani killed?
The Iraqi prime minister revealed he had been due to meet Soleimani on Friday, the day he was killed along with six others when their vehicles were hit by missiles as they were leaving Baghdad airport.
The Iranian commander had reportedly flown in from Lebanon or Syria in the early hours of that morning.
"I was scheduled to meet martyr Soleimani at 08:30 in the morning," the prime minister said on Sunday.
"He was killed because he was set to deliver a response from Iranians to a Saudi message, which we delivered to the Iranians to reach an important breakthrough in the situation in Iraq and the region."
Also killed along with Soleimani was Abu Mahdi al-Muhandis, an Iraqi who had commanded the Iranian-backed Kataib Hezbollah group.
How dangerous is the situation?
Operation Inherent Resolve, as the international coalition is formally known, announced it was halting operations against IS in order to protect US, UK and other foreign troops based in Iraq.
It pointed to repeated rocket attacks over the last two months which it blamed on Kataib Hezbollah.
"We remain resolute as partners of the government of Iraq and the Iraqi people that have welcomed us into their country to help defeat Isis [IS]," it said.
Read More – Source