Tens of thousands of Iraqis mourned a top Iranian commander and others killed in a US drone attack, before near-simultaneous mortar and rocket attacks targeted American troops late Saturday.
The killing of Iran's Major General Qasem Soleimani on Friday was the most dramatic escalation yet in spiralling tensions between Iran and the United States, which pledged to send thousands more troops to the region, amid fears of a regional proxy war between the foes.
In the first hints of a possible retaliatory response, mortar rounds hit an area near the US embassy in Baghdad on Saturday, security sources told AFP.
Moments later, two rockets slammed into an Iraqi base where American troops are deployed, security sources said.
The Iraqi military confirmed the missile attacks in Baghdad and on Balad base and said there were no casualties.
US troops and diplomats had been bracing themselves for more rocket attacks following the precision drone strike that killed Iran's military mastermind Soleimani.
On Saturday, Iraqi political leaders and clerics attended the mass ceremony to honour 62-year-old Soleimani and the other nine victims of the hit on Baghdad airport.
Trump had said Soleimani was planning an "imminent" attack on US diplomats and the roughly 5,200 American troops deployed in Baghdad.
- 'Foolish' US message -
A furious Iran has vowed revenge for the killing of Soleimani, the chief architect of its military operations across the Middle East.
"The response for a military action is a military action," Iranian ambassador to the United Nations Majid Takht Ravanchi told CNN, calling the strike an "act of war".
"By whom, by when, where? That is for the future to witness."
World powers quickly called for a de-escalation, and Qatari Foreign Minister Mohammed bin Abdulrahman Al-Thani was in Tehran on Saturday for talks with his Iranian counterpart Mohammad Javad Zarif.
The pair discussed Soleimani's killing, with Zarif insisting Iran did "not want tension in the region".
Zarif had earlier rebuffed a diplomatic effort by the United States, who sent a letter to Iranian officials through a Swiss envoy, as Tehran and Washington have not had direct diplomatic ties for decades.
Iran's Revolutionary Guards said Washington had used "diplomatic measures" to urge Tehran to respond "in proportion" to the strike -- a message Zarif slammed as "foolish".
Switzerland confirmed Saturday its charge d'affaires had delivered a message from the US to Iran.
The US strike killed a total of five Iranian Guards and five members of Iraq's Hashed al-Shaabi paramilitary network, whose members have close ties to Tehran.
Among the dead was Hashed's deputy head Abu Mahdi al-Muhandis, a top adviser and personal friend to Soleimani.
Mass ceremonies started in Baghdad on Saturday for them, with Iraq's caretaker premier Adel Abdel Mahdi and top pro-Iran figures in large crowds accompanying the coffins.
Tens of thousands of mourners across the country waved white Hashed flags and massive portraits of Iranian and Iraqi leaders, furiously calling for "revenge" and "Death to America!"
The remains were moved from Baghdad to the shrine city of Karbala and would ultimately end up in Najaf, where the Iraqis will be buried.
The Guards' remains would be flown to Iran, which has declared three days of mourning and religious rituals.
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.
He had long been considered a lethal foe by Washington, with Trump saying he 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.
- Hashed vows US ouster -
Iraqis worry the US strike could unleash tit-for-tat strikes between the Hashed and the US.
Early on Saturday, the Hashed claimed a new strike had hit their convoy north of Baghdad, with Iraqi state media blaming the US.
But the US-led coalition denied involvement, telling AFP: "There was no American or coalition strike."
Following tensions, NATO said it was suspending its training activities in Iraq and a US defence official told AFP that American-led coalition forces would "limit" operations.
"Our first priority is protecting coalition personnel," the official said, saying surveillance had shifted from IS to watching for incoming rocket attacks.