Earlier on Wednesday, U.S. Marines guarding the embassy fired tear gas after the protesters lit a fire on the roof of the reception area, the Associated Press reported. Smoke could be seen rising from the building.
Despite the protests ending, the U.S. Embassy in Baghdad said in a statement Wednesday that all public consulate operations have been suspended and advised U.S. citizens not to even approach the compound.
"Due to militia attacks at the U.S. Embassy compound, all public consular operations are suspended until further notice. All future appointments are canceled. U.S. citizens are advised to not approach the embassy," according to the statement.
The protesters, made up of dozens of pro-Iranian militiamen and their supporters, stayed the night outside the compound after a day of violence in which hundreds of marchers set a sentry box on fire, hurled water bottles at retreating security guards, and chanted, "Down, down USA."
During Tuesday's protests, marchers pushed their way past an outer wall right up to the embassy gates, but a State Department spokesperson said that the embassy itself was never breached.
In response, Defense Secretary Mark Esper said Tuesday night that an infantry battalion of about 750 soldiers from the 82nd Airborne Division would be deployed to the Middle East "immediately." The 82nd Airborne Division tweeted photos early Wednesday of more than 650 paratroopers as they began the deployment.
The assault on the compound grew out of anger over U.S. airstrikes against an Iranian-backed militia Sunday.
Iraq remains on the State Dept.’s "Level 4: Do Not Travel" list for American citizens.
The protesters' dispersal and suspension of consulate operations come less than 24 hours before Secretary of State Mike Pompeo was scheduled to depart for his first visit to Ukraine among other countries -- a visit that has now been cancelled.
"Secretary Pompeo must postpone his visit to Ukraine, Belarus, Kazakhstan, Uzbekistan, and Cyprus due to the need for the Secretary to be in Washington, D.C., to continue monitoring the ongoing situation in Iraq and ensure the safety and security of Americans in the Middle East," State Department Spokesperson Morgan Ortagus said in a statement Wednesday.
ABC News' Libby Cathey contributed to this report.