Several thousand protesters attacked the US embassy in the Iraqi capital on Tuesday in anger at US air strikes that killed more than two dozen pro-Iran fighters at the weekend.

A stream of men in military fatigues, as well as some women, marched through checkpoints that usually restrict access to Baghdad's high-security Green Zone.

They waved flags in support of the Hashed al-Shaabi, a network of armed groups that has been largely incorporated into the security forces.

On Sunday, at least 25 fighters from a hardline Hashed faction known as Kataeb Hezbollah (Hezbollah Brigades) were killed in US air strikes on a base in western Iraq.

The strikes were in response to escalating rocket attacks on Iraqi bases where US forces are deployed.

The attacks have not been claimed but US security assessments have largely blamed them on Kataeb Hezbollah.

The demonstrators on Tuesday reached the US embassy walls, chanting "Death to America" and burning US flags.

They held up posters calling for the embassy to be shut down and for parliament to order US forces to leave the country.

"Parliament should oust US troops, or else we will," one poster said.

They pulled security cameras off the wall as Iraqi security forces tried to keep them back.