Sirens wailed on Monday night inside Baghdad's heavily fortified Green Zone as it came under rocket attack.
The government said there were two rockets but an official inside the area said three hit a car park and open areas, damaging civilian cars. There were no reported casualties.
The attack is the third in the country in a week.
The first was on Monday last week when more than 10 Iranian-made rockets hit Erbil Airport, killing a military contractor and wounding an American soldier and others, including nearby civilians.
A little-known Shiite militia group called Saraya Awliya Al Dam claimed responsibility for the attack.
The group is believed to be a front for an Iranian-backed militia.
A few days later, an unidentified armed group fired three rockets at Balad airbase, north of Baghdad, where American contractors were working as ground crew for Iraq's F-16s. An Iraqi contractor was injured.
These attacks are the first real test for US President Joe Biden in Iraq. They also come a few weeks before the first papal visit to the war-ravaged nation.
“We will hold Iran responsible for the actions of its proxies who attack Americans," US State Department spokesman Ned Price said.
"The rockets fired in recent attacks ... are Iranian made and Iranian supplied.
“What we will not do is lash out and risk an escalation that plays into the hands of Iran and contributes to their attempts to further destabilise Iraq.”
The Green Zone is the seat of key government offices and western diplomatic missions in Baghdad.
It has been a frequent target for militants since the 2003 US-led invasion that toppled Saddam Hussein's regime.