Iraq's parliament was expected to vote Sunday on ousting US troops from military bases, which are threatened by pro-Tehran factions after an American strike killed top Iranian and Iraqi commanders.
Late Saturday, missiles slammed into the Baghdad enclave where the US embassy is located and an airbase north of the capital where American troops are deployed, prompting US President Donald Trump to threaten strikes on 52 sites in Iran.
The near-simultaneous attacks seemed to be the first phase of promised retaliation for the US precision drone strike that killed Iran's Major General Qasem Soleimani and Abu Mahdi al-Muhandis, deputy head of Iraq's Hashed al-Shaabi.
While no one claimed Saturday's attacks, a hardline pro-Iran faction in the Hashed, a network of Shiite-majority armed groups incorporated into the state, urged Iraqis to move away from US forces.
"We ask security forces in the country to get at least 1,000 meters away from US bases starting on Sunday at 5:00pm (1400 GMT)," said the Kataeb Hezbollah faction.
The deadline coincides with the planned conclusion of a parliamentary session on Sunday which the Hashed has insisted should see a vote on the ouster of US troops.
Some 5,200 US soldiers are deployed across Iraqi bases to train and support local troops to prevent a resurgence of the Islamic State jihadist group.
They are deployed as part of the broader international coalition, invited by the Iraqi government in 2014 to help fight IS as it swept across Iraqi territory.
The Hashed, whose Shiite-majority factions have close ties to Iran, has vehemently opposed their presence for months.
Its hardline members and its political branch, the Fatah bloc, have called on parliament to revoke the invitation.
The 329-member parliament is set to meet at 1:00pm local time (1000 GMT) and while no agenda has been published, many lawmakers are pushing for a vote on the foreign troops.
"We either vote on the occupation forces leaving, or we remain subservient, robbed of our will and dignity," said Fatah MP Ahmad al-Kinany.
"Any parliamentarian absent for the vote on the departure of the occupier will have betrayed his country," he said.
While praying over Muhandis' remains in Baghdad on Saturday, Fatah head Hadi al-Ameri pledged to avenge him.
"Be reassured that the price of your pure blood will be the departure of American troops from Iraq, forever," he said.
US defence officials in Iraq told AFP in the hours ahead of the session that they felt apprehensive and nervous.
Already, increased tensions prompted NATO to suspend its training activities in Iraq and a US defence official told AFP American-led coalition forces would "limit" operations.
"Our first priority is protecting coalition personnel," the official said, saying surveillance had shifted from monitoring jihadist sleeper cells to watching for incoming rocket attacks.
As Saturday's rocket attacks unfolded, coalition planes were heard circulating above their bases in Kirkuk province, AFP's correspondent there said.
"Through his allies in Iraq, Qasem Soleimani had sought the departure of US forces," said Tom Warrick, a former US official and current fellow at the Atlantic Council.
"If US forces do end up withdrawing, it could grant Soleimani a post-humous victory," Warrick told AFP.
The US strike on Baghdad international airport early Friday killed a total of five Iranian Revolutionary Guards and five members of Iraq's Hashed.
After a procession that made its way across various Iraqi cities on Saturday, the remains of the Iranians, plus those of Muhandis and another Hashed member, were flown to Iran.
DNA testing was required to separate the Iraqis' remains from the Iranians so they could be properly buried, the Hashed said.
As head of the Guards' foreign operations arm, the Quds Force, Soleimani was a powerful figure domestically and oversaw Iran's wide-ranging interventions in regional power struggles.
US President Donald Trump had said Soleimani was planning an "imminent" attack on US personnel in Baghdad and should have been killed "many years ago".
Iran's supreme leader Ayatollah Ali Khamenei promised "severe revenge" for Soleimani's death and Tehran named Soleimani's deputy, Esmail Qaani, to succeed him.
The attacks on Saturday evening appeared to be precisely the reaction Iraqis had long feared: tit-for-tat strikes between the Hashed and the US on Iraqi soil.
"This is no longer a proxy war," said Erica Gaston, a non-resident fellow at the New America Foundation.
"What you have is America attacking an Iranian general directly, and groups are now openly fighting for Iran to avenge him. This is a direct war," she told AFP.