Hundreds of men waving Iraqi and militia flags torched a security post and hurled stones at security forces, as embassy guards fired stun grenades and tear gas to disperse crowds that breached the outer wall of America's largest embassy.
There were no reports of casualties, but the breach was one of the worst attacks on a US embassy in recent memory. The Pentagon said it had deployed extra troops to protect the mission. Meanwhile, the State Department said there were no plans to evacuate the compound.
US President Donald Trump blamed Iran for "orchestrating" the attack and said Tehran would be held "fully responsible."
"We expect Iraq to use its forces to protect the Embassy," Trump tweeted.
The militiamen were demonstrating against US airstrikes in Iraq and Syria on Sunday targeting Kataeb Hezbollah, an Iran-backed Iraqi militia. At least 25 militiamen were killed.
Iraqi security forces allowed thousands of protesters to march to the heavily-fortified Green Zone after a funeral held for those killed, letting them pass through a security checkpoint leading to the area.
Many in the crowd shouted "Down, Down USA!'' and "Death to America'' and "Death to Israel'' outside the embassy compound as they threw objects over its walls.
The US blamed Kataeb Hezbollah for a rocket barrage on Friday that killed an American defense contractor and wounded four US soldiers at the K1 Iraqi military base in Kirkuk in the north of the country. Since late October, at least 11 attacks have targeted Iraqi military bases where US soldiers or diplomats are deployed. There were no casualties in any of the attacks. The US has blamed Iran-backed militia and warned of retaliation.
"Iran killed an American contractor, wounding many. We strongly responded, and always will," Trump said on Tuesday.
Caught in the middle
Iraq — a close ally of Iran and the United States — has long struggled to balance relations between the two countries. It has also feared becoming a proxy battleground as tensions have soared between the US and Iran over the Trump administration's "maximum pressure" campaign.
"This may well be the low-point of US policy in Iraq," Fanar Haddad, an Iraq expert at the Middle East Institute of the National University of Singapore, wrote on Twitter.
The US retaliation threatens to unleash a dangerous spiral of escalation and backlash against the US military presence in Iraq at a time the country is politically unstable following nearly three months of deadly anti-government protests.
Kataeb Hezbollah is backed by the Iranian Revolutionary Guard's elite al-Quds force. Led by one of Iraq's most powerful men, Abu Mahdi al-Muhandis, the militia is part of the Popular Mobilization Units mobilized to fight against the "Islamic State" group.
On Tuesday, Kataeb Hezbollah fighters were joined at the US embassy by some of Iraq's most powerful men to protest the US strikes. Among them were Qais al-Khazali, leader of the Iranian-backed Asaib Ahl al-Haq militia; Hadi al-Amiri, the head of the Popular Mobilization Units and leader of one of parliament's most powerful blocs; and National Security Adviser Faleh Fayyadh.
The US attack has hastened calls from militia leaders and politicians for some 5,000 US forces to leave the country, with some calling for US forces to be removed by force.
The protests against corruption, poor services and a dire economy have been directed at the entire political class and increasingly against Iranian meddling in the country. On several occasions, Iranian consulates have been attacked by anti-government protesters in predominately Shiite southern Iraq.
"Protesters were focused first on the corruption and sectarian nature of the government, but also on Iran's role in propping up this dysfunctional system," Ilan Goldenberg, a former US government defense official who is now Middle East Security Director at the think tank CNAS, wrote on Twitter.
"Today the narrative seems to have entirely switched as a result of the events of the past few days. The main target at least for the moment is now the US. Another unforced error by the Trump administration," he wrote.
The US attacks appeared to have played into Iran's calculation and will primarily harm the protest movement, said Ghassan Al-Attiyah, the director of the Iraqi Institute for Development and Democracy in a DW interview. "Forces linked to Tehran could now give the impression that the most important thing is to fight the US presence in the country."