Protesters burn property in front of the US embassy compound, in Baghdad, Iraq. Dozens of angry Iraqi Shi'a militia supporters broke into the US Embassy compound after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. Picture: Khalid Mohammed/AP

Baghdad/Washington - The United States will immediately deploy 750 soldiers to Iraq, the Pentagon said on Tuesday, after a crowd of protesters attacked the US embassy in Baghdad.

The move is the latest in an escalation that began after the US launched strikes over the weekend on an Iranian-backed militia in Iraq and Syria.

"This deployment is an appropriate and precautionary action taken in response to increased threat levels against US personnel and facilities, such as we witnessed in Baghdad today," US Defense Secretary Mark Esper said in a statement.

Esper added that additional troops are prepared to deploy in the coming days.

Thousands of supporters of the militia converged on Baghdad's heavily fortified Green Zone on Tuesday, home to government offices and foreign embassies, to denounce the US strikes.

Witnesses told dpa that protesters crossed the outside wall of the US embassy compound and attempted to climb a second wall but were unable to penetrate further or reach the main buildings.

Demonstrators chanting "Death to America" later set fire to one of the gates in the US compound, witnesses said, despite appeals from Iraq's premier Adel Abdel-Mahdi for them to leave.

President Donald Trump vowed that Iran would be held responsible for lives lost and damage incurred from the incident.

"They will pay a very BIG PRICE! This is not a warning, it is a threat. Happy New Year!" Trump said on Twitter.

Later, reporters outside his Mar-a-Lago resort in Florida asked the US president: "Do you foresee going to war with Iran?"

"I don't think that would be a good idea for Iran, it wouldn't last very long," Trump asserted, adding: "Do I want to? No."

"I want to have peace, I like peace, and iran should want peace more than anybody so I don't see that happening," Trump said.

While Trump is holding Iran responsible for the incident at the US mission in Baghdad, Tehran blasted Washington's "irrational response" to the protests, and denied any involvement.

Washington should accept the fact that it is seen by the Iraqis as an "occupying power" in a sovereign state, and that is why there are protests against the US, Iran's Foreign Ministry spokesman Abbas Mousavi said, according to the Iranian news agency Mehr.

The US strikes over the weekend in Iraq and Syria targeted the Kataib Hezbollah militia group, which was blamed for an attack earlier this week that killed a US citizen.

Hashd Saabi - whose supporters attacked the US embassy on Tuesday - is an umbrella group which includes Kataib Hezbollah.

For its part, the Hashd Shaabi militia said that 75 protesters were wounded after the guards at the embassy fired tear gas and bullets, without specifying what kind of ammunition was used.

The group said airstrikes left 25 militiamen dead and 50 others wounded.

The United States already sent additional forces, including attack helicopters to protect the large embassy complex, which has not been evacuated.

Trump spoke with Abdel-Mahdi by phone and "emphasized the need to protect United States personnel and facilities in Iraq," the White House said in a statement.

Defense Secretary Mark Esper called on the government of Iraq to "fulfil its international responsibilities" to protect US citizens in the country.