Dozens of people stormed the compound of the United States embassy in Iraq on Tuesday in response to American airstrikes that killed dozens of fighters from an Iran-backed militia group.

Guards inside the embassy used tear gas to try and prevent demonstrators from moving towards main buildings inside the compound, an Iraqi security source told NBC News on condition of anonymity.

American fighter jets on Sunday bombed weapons depots in Iraq and Syria that the U.S. said were linked with a group called Kataeb Hezbollah, which it blames for attacks on coalition bases in recent months.

At least 25 militia fighters were killed in the airstrikes, and on Tuesday a large crowd of supporters gathered after funerals for some of the dead and marched on the U.S. embassy in Baghdad's heavily fortified Green Zone.

They chanted "Down, Down USA!" while hurling water bottles and smashing security cameras, according to The Associated Press. An AP reporter at the scene saw flames rising from inside the compound and at least three U.S. soldiers on the roof of the main building inside the embassy.

29 PHOTOS Outraged Iraqi protesters storm the U.S. Embassy in Baghdad See Gallery Outraged Iraqi protesters storm the U.S. Embassy in Baghdad Iraq protesters demonstrate in front of US embassy over strikes Iraq protesters to government: Listen to us (not to Iran) U.S. soldiers fire tear gas towards protesters who broke into the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters burn property and wave militia flags in front of the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters burn property in front of the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters burn property in front of the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters damage property inside the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters burn property in front of the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters burn property in front of the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters burn property in front of the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters smash a window inside the U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) U.S. soldiers fire tear gas to stop protesters inside U.S. embassy compound, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) U.S. soldiers fire tear gas to stop protesters inside U.S. embassy in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Protesters burn property inside the U.S. embassy compund, in Baghdad, Iraq, Tuesday, Dec. 31, 2019. Dozens of angry Iraqi Shiite militia supporters broke into the U.S. Embassy compound in Baghdad on Tuesday after smashing a main door and setting fire to a reception area, prompting tear gas and sounds of gunfire. (AP Photo/Khalid Mohammed) Iraqi protesters try to disable the camera on the outer wall of the US embassy in Baghdad's Green Zone during an angry demonstration on December 31, 2019 to denounce weekend US air strikes that killed Iran-backed fighters in Iraq. - It was the first time in years protesters have been able to reach the US embassy in the Iraqi capital, which is sheltered behind a series of checkpoints in the high-security Green Zone. (Photo by AHMAD AL-RUBAYE / AFP) (Photo by AHMAD AL-RUBAYE/AFP via Getty Images) Iraqi protesters throw stones at the US embassy in Baghdad's Green Zone during an angry demonstration on December 31, 2019 to denounce weekend US air strikes that killed Iran-backed fighters in Iraq. - It was the first time in years protesters have been able to reach the US embassy in the Iraqi capital, which is sheltered behind a series of checkpoints in the high-security Green Zone. (Photo by SABAH ARAR / AFP) (Photo by SABAH ARAR/AFP via Getty Images) Iraqi protesters throw stones at the US embassy in Baghdad's Green Zone during an angry demonstration on December 31, 2019 to denounce weekend US air strikes that killed Iran-backed fighters in Iraq. - It was the first time in years protesters have been able to reach the US embassy in the Iraqi capital, which is sheltered behind a series of checkpoints in the high-security Green Zone. (Photo by AHMAD AL-RUBAYE / AFP) (Photo by AHMAD AL-RUBAYE/AFP via Getty Images) A member of the Iraqi security forces stands guard in front of the outer wall of the US embassy in the capital Baghdad during a protest on December 31, 2019, to denounce the weekend's air strikes by US planes on several bases belonging to the Hezbollah brigades near Al-Qaim, an Iraqi district bordering Syria - It was the first time in years protesters have been able to reach the US embassy in the Iraqi capital, which is sheltered behind a series of checkpoints in the high-security Green Zone. (Photo by AHMAD AL-RUBAYE / AFP) / The erroneous mention[s] appearing in the metadata of this photo by AHMAD AL-RUBAYE has been modified in AFP systems in the following manner: [A member of the Iraqi security forces] instead of [An armed member of [An armed member of Iraq's pro-Iranian Hashd al-Shaabi paramilitary group] Please immediately remove the erroneous mention[s] from all your online services and delete it (them) from your servers. If you have been authorized by AFP to distribute it (them) to third parties, please ensure that the same actions are carried out by them. Failure to promptly comply with these instructions will entail liability on your part for any continued or post notification usage. Therefore we thank you very much for all your attention and prompt action. We are sorry for the inconvenience this notification may cause and remain at your disposal for any further information you may require. (Photo by AHMAD AL-RUBAYE/AFP via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters hold flags and placards as they storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) Irak'ta ii milis gücü Hadi abi yanls protestocular, ABD'nin Badat Büyükelçilii binasn basarak içeri girdi. ABD yönetiminin Hadi abieya bal Hizbullah Tugaylar'na düzenledii saldry protesto etmek için bakent Badat'taki ABD Büyükelçilii önünde toplanan protestocular, Hizbullah bayraklar ve dövizler tad. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters hold flags and placards as they storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters hold flags and placards as they storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters set fire to the wall as they storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters set fire to the wall as they storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters set fire to the wall as they storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters set fire to the wall as they storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Haydar Karaalp/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Murtadha Sudani/Anadolu Agency via Getty Images) BAGHDAD, IRAQ - DECEMBER 31: Outraged Iraqi protesters storm the U.S. Embassy in Baghdad, protesting Washington's attacks on armed battalions belong to Iranian-backed Hashd al-Shaabi forces on December 31, 2019. At least 25 people were killed in weekend U.S. airstrikes on positions of Kataib Hezbollah, an Iranian-backed militia group, in Iraq and Syria. Hundreds of Iraqi protesters gathered early Tuesday near the embassy to show their anger at the U.S. move. (Photo by Murtadha Sudani/Anadolu Agency via Getty Images) An Iraqi protester holds up a sign that he took off from outside the US embassy in Baghdad after breaching the outer wall of the diplomatic mission during an angry demonstration on December 31, 2019 to denounce weekend US air strikes that killed Iran-backed fighters in Iraq. - It was the first time in years protesters have been able to reach the US embassy in the Iraqi capital, which is sheltered behind a series of checkpoints in the high-security Green Zone. (Photo by AHMAD AL-RUBAYE / AFP) (Photo by AHMAD AL-RUBAYE/AFP via Getty Images) Up Next See Gallery Discover More Like This HIDE CAPTION SHOW CAPTION of SEE ALL BACK TO SLIDE

At least 62 demonstrators were injured by live bullets and tear gas, according to the Popular Mobilization Forces, an umbrella group for the militias recognized by the Iraqi government. NBC News could not independently verify this claim.

There were roughly 6,000 protesters at the height of the demonstrations, a U.S. official estimated, composed mostly of Kataib Hezbollah members.

The embassy was on lockdown by evening, but American personnel were not being evacuated, according to a U.S. official was knowledge of the situation. The official said discussions were underway about next steps should an evacuation be necessary.

President Donald Trump, who tweeted that he expected protection from Iraq's security forces, accused Iran of orchestrating the attack, and said the Iranian government "will be held fully responsible." His press secretary, Stephanie Grisham, said the president will choose "how and when we respond to their escalation."

But Democrats said the embassy attack was the latest example of the failure of the Trump administration's policy in the region. "It’s hard to overstate what a total failure Trump’s Iran policy has been," Ben Rhodes, a top national security aide in the Obama administration, wrote on Twitter. "Nuclear program resumed. Regional provocations escalated. US isolated."

Sen. Chris Murphy, D-Ct., a member of the Foreign Relations Committee, said the attacks were a reminder of how "catastrophic" the year has been for U.S. interests in the Middle East, and tweeted a long list of problems in the region.

"Really hard to overstate how badly Trump has bungled things in the Middle East," he wrote on Twitter. "One of the only good things going — anti-Iran street protests in Iraq — have now morphed into anti-U.S. protests thanks to Trump's mishandling of Iran policy."

Secretary of State Mike Pompeo spoke to Iraqi Prime Minister Adil Abdul-Mahdi and President Barham Salih separately by phone on Tuesday and told them "the United States will protect and defend its people, who are there to support a sovereign and independent Iraq," according to a State Department statement.

"Both Abdul-Mahdi and Salih assured the Secretary that they took seriously their responsibility for and would guarantee the safety and security of U.S. personnel and property," the statement said.

Matthew Tueller, the U.S. ambassador to Iraq, was out of the country during the protests, two U.S. officials with knowledge of the situation told NBC News.

Abdul-Mahdi issued a statement urging people to leave the U.S. embassy, warning that "any aggressive behavior against foreign embassies" will be "strictly stopped by security forces" and punished by law.

The clashes follow anti-government protests in recent months in which hundreds of people have been killed, according to protest groups, most of them by Iraqi security forces. The mass uprisings prompted the resignation last month of the prime minister, who remains in a caretaker capacity.

The U.S. blames the militant group Kataeb Hezbollah for 11 attacks on bases used by the U.S.-led coalition over the past two months. The latest of these came on Friday, when a rocket attack killed a U.S. contractor and injured four other American service members.

The U.S. airstrikes have been met with an angry reaction from both Iran and Iraq.

The U.S. has some 5,000 troops in Iraq train and assist government troops in the fight against the Islamic State militant group. But the Iraqi government is also allied with a powerful network of militia groups, many of which are backed by or linked to Tehran.

Tehran called the U.S. airstrikes "terrorism" and Iraq called them a "violation" of its sovereignty. The militia targeted has vowed to respond.

CORRECTION (Dec. 31, 2019, 10:31 a.m.): An earlier version of this article misidentified the White House press secretary. She is Stephanie Grisham, not Graham.

More from :

Thai SEAL dies of blood infection a year after cave rescue

Christmas Day passes with no sign of 'gift' that North Korea warned of

Losing weight after age 50 linked to lower breast cancer risk