The United States embassy in Baghdad has been attacked with two salvos of rockets but there were no casualties, an embassy spokesperson says.
The attack was believed to have been carried out by Iran-aligned militias in Iraq, the spokesperson said.
No group immediately claimed responsibility.
It was the first reported rocket attack against the embassy since an umbrella group of Iran-aligned Shi'ite Muslim militias initiated attacks against US forces on military bases in Iraq and neighbouring Syria in mid-October.
The armed groups, operating under the banner of the Islamic Resistance in Iraq, have linked more than 70 such attacks to Washington's backing of Israel in its devastating assault on Gaza.
"We again call on the government of Iraq, as we have done on many occasions, to do all in its power to protect diplomatic and coalition partner personnel and facilities," the embassy spokesperson said.
Iraqi Prime Minister Mohammed Shia al-Sudani directed security agencies to pursue the perpetrators, describing them as "unruly, lawless groups that do not in any way represent the will of the Iraqi people", a statement from his office said.
He also said that undermining Iraq's stability, reputation and targeting places Iraq has committed to protect were acts of terrorism.
Explosions were heard near the embassy, in the centre of Iraq's capital, about 4am on Friday.
Sirens calling on people to take cover were activated, according to social media videos from the scene.
Aside from its diplomatic staff in Iraq, the US has about 2500 troops in the country on a mission it says aims to advise and assist local forces trying to prevent a resurgence of Islamic State, which in 2014 seized large swathes of both countries before being defeated.
"We reiterate that we reserve the right to self-defence and to protect our personnel anywhere in the world," the spokeperson said.
The United Nations mission in Iraq condemned the attack.
"Iraq cannot afford to be drawn into a wider conflict, which would threaten hard-won stability and the achievements made so far," it said in a social media post.
Australian Associated Press