FILE - Iraqi Prime Minister Mustafa al-Kadhimi poses in his office during an interview with The Associated Press in Baghdad, Iraq, Friday, July 23, 2021. (AP Photo, File)
The attack in Baghdad's Green Zone was the first to target the residence of Kadhemi, who has been in power since May 2020, and came as Iraq's political parties wrangle over who will run the next government after elections last month.
That vote saw the Conquest (Fatah) Alliance, the political arm of the pro-Iran Hashed al-Shaabi paramilitary network, suffer a substantial decline in its parliamentary seats, leading the group to denounce the outcome as "fraud".
No group has yet claimed responsibility for Sunday's attack, which left two bodyguards injured, according to a security source.
In a tweet, Kadhemi called "for calm and restraint on the part of everyone for the good of Iraq".
"My residence has been the target of cowardly assault. Praise God, I am fine and so are those who work with me," he then said in a short video shared on social media.
"Cowardly missiles and drones don't build nations."
Kadhemi's office described the attack as a "failed assassination attempt".
The United States swiftly condemned the attack and said it was "relieved to learn the Prime Minister was unharmed".
"This apparent act of terrorism, which we strongly condemn, was directed at the heart of the Iraqi state," State Department spokesman Ned Price said in a statement.
"We are in close touch with the Iraqi security forces charged with upholding Iraq's sovereignty and independence and have offered our assistance as they investigate this attack."
A large number of security forces were deployed in and around the heavily guarded Green Zone, which also hosts the US embassy and is frequently targeted by rocket attacks.
On October 31, three rockets fell in Mansour, a neighbouring district, without causing any injuries.
- Mounting tensions -
The attack came during a period of soaring tensions over the results of the October 10 elections.
Hundreds of Hashed supporters clashed with police on Friday while protesting near the Green Zone to vent their fury over the result.
One protestor died of their injuries in hospital, according to a security source, while a Hashed source said two demonstrators were killed.
The health ministry reported 125 injuries, most of them from the security forces.
Several hundred supporters of pro-Iranian groups returned to the Green Zone on Saturday to protest.
Some burned a portrait of the prime minister, whom they called a "criminal".
According to preliminary tallies, the Conquest won around 15 of the 329 seats in parliament last month, down from the 48 it held previously, which made it the second-largest bloc.
The big winner this time, with more than 70 seats according to the initial count, was the movement of Moqtada Sadr, a Shiite Muslim preacher who campaigned as a nationalist and critic of Iran.
Final election results are expected within weeks.