Two Katyusha rockets struck Baghdad's heavily fortified Green Zone on Wednesday, landing near the US embassy but causing no casualties, according to the Iraqi military.
Sirens immediately rang out at the American compound in the area hosting both diplomats and troops, according to military sources.
The attack came nearly 24 hours after Tehran launched ballistic missiles at Iraqi bases housing American and other coalition forces, which did not cause casualties.
The strikes were in retaliation for a US drone strike that killed top Iranian general Qasem Soleimani and Iraqi commander Abu Mahdi al-Mohandes last week.
Al-Mohandes had been the deputy head of the Popular Mobilization Units (PMU) militias, known as the Hashed al-Shaabi, a web of armed groups incorporated into the Iraqi state but which also have close ties to Tehran.
The United States had accused PMU militias of being behind a string of rocket attacks on the US embassy in Baghdad and bases hosting American troops across the country.
On Wednesday, the PMU’s hardline factions vowed they, too, would take revenge for the US raid.
Paramilitary chief Qais al-Khazali - blacklisted as a “terrorist” by the US - said Iraq’s response to the US “will be no less than the size of the Iranian response.”
Harakat al-Nujaba, a hardline PMU faction, vowed to avenge al-Mohandes.
“To American soldiers: Do not close your eyes. Revenge for the martyr Mohandes is coming at the hands of Iraqis - until the last soldier among you leaves,” it said.