Iraqi officials said Sunday the residence of Prime Minister Mustafa al-Kadhimi was hit by rocket fire but he was unharmed in the attack.

Residents of Baghdad heard the sound of an explosion followed by gunfire from the direction of the capital’s heavily fortified Green Zone, which houses foreign embassies and government offices.

POST-WITHDRAWAL AFGHANISTAN IS 'MUCH WORSE' THAN IRAQ POWER VACUUM THAT SPAWNED ISIS, GENERAL SAYS

Two Iraqi officials said al-Kadhimi’s residence was hit by rocket fire. It was not immediately clear who fired the rocket. The officials spoke on condition of anonymity in line with regulations.

CLICK HERE TO GET THE FOX NEWS APP

06 November 2021, Iraq, Baghdad: A man holds up a poster of Iraqi Prime Minister Mustafa Al-Kadhimi, reading "Wanted Criminal" during a mourning event in front of one of the gates of Baghdad's Green Zone following Friday's clashes between Iraqi security forces and demonstrators protesting the results of last month's parliamentary elections, in which pro-Iranian groups suffered significant losses. Photo: Ameer Al Mohammedaw/dpa (Photo by Ameer Al Mohammedaw/picture alliance via Getty Images)

06 November 2021, Iraq, Baghdad: A man holds up a poster of Iraqi Prime Minister Mustafa Al-Kadhimi, reading "Wanted Criminal" during a mourning event in front of one of the gates of Baghdad's Green Zone following Friday's clashes between Iraqi security forces and demonstrators protesting the results of last month's parliamentary elections, in which pro-Iranian groups suffered significant losses. Photo: Ameer Al Mohammedaw/dpa (Photo by Ameer Al Mohammedaw/picture alliance via Getty Images)

Pro-Iran Shiite militias supporters have been camped outside the Green zone for nearly a month after they rejected the results of Iraq’s parliamentary elections in which they were the biggest losers.

Prime Minister al-Kadhimi responded to the attack on Twitter saying that the "missiles of treachery" will not "discourage the believers. 

Reuters reported that the prime minister is safe from what is being described as an assassination attempt from a drone.

The Associated Press contributed to this report.