Hundreds of thousands of Iranians turned out to pay their respects to General Qassim Soleimani on Sunday as Iraq's parliament voted to expel US forces from the country over his assassination in Baghdad.

The momentous vote came as Iran said it would ditch all limitations on its uranium enrichment program under the 2015 nuclear deal in response to the killing and the US-led coalition fighting Islamic State in Iraq halted operations because of fears of revenge attacks by Iranian-allied groups.

At least three rockets landed near the US embassy in Baghdad late on Sunday night, prompting Donald Trump to threaten a rapid and possible "disproportionate" response if Iran struck a US target. No casualties were immediately reported.

Earlier Adil Abdul-Mahd, Iraq’s acting prime minister, told an extraordinary session of parliament that the killing of Gen Soleimani was an "unacceptable" violation of sovereignty and asked for MPs backing to end the US-led coalition's stay in the country. The resolution passed despite a boycott by most Kurdish and Sunni MPs.