Iran-backed militiamen withdrew from the US Embassy compound in Baghdad on Wednesday after two days of clashes with American security forces, but US-Iran tensions remain high and could spill over into further violence.

The withdrawal followed calls from the government and senior militia leaders. It ended a high-stakes two-day crisis that prompted the Pentagon to send hundreds of additional troops to the Middle East.

Earlier in the day, US troops fired tear gas as the militia members hurled rocks.

The unrest erupted Tuesday after US jet fighters attacked five bases in Iraq and Syria belonging to the Iranian-backed Kataib Hezbollah over the weekend, killing 25 fighters and wounding dozens more.

The US strike was in retaliation for a rocket attack on an Iraq base by the group that killed an American contractor and wounded four US service members.

Scores of demonstrators camped outside the embassy overnight after they stormed the heavily fortified Green Zone, chanting “Death to America,” lighting fires at security posts, spraying graffiti on walls and trying to bust through sealed entrances.

But they began to dismantle their tents and load up trucks with equipment after the Popular Mobilization Forces, an umbrella group of mainly Shiite-aligned militias, including, Kataib Hezbollah, called on its supporters to move away from the compound after the Iraqi government said their “message has been heard.”

“After achieving the intended aim, we pulled out from this place triumphantly,” said Fadhil al-Gezzi, a militia supporter. “We rubbed America’s nose in the dirt.”

The retreat also comes after Defense Secretary Mark Esper said the US would deploy about 750 troops to the Middle East in response to the storming of the embassy and another 4,000 troops could be sent to the region in the next few days.

“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,” Esper said in a statement. “The United States will protect our people and interests anywhere they are found around the world.”

Trump, speaking to reporters Tuesday evening at his Mar-a-Lago resort in Florida, said the situation in Baghdad was “handled very well.”

“The Marines came in. We had some great warriors come in and do a fantastic job.  And they were there instantaneously, as soon as we heard. I used the word ‘immediately,’ they came immediately,” the president said.

“This will not be a Benghazi. Benghazi should never have happened. This will never, ever be a Benghazi,” he added.

On Sept. 11, 2012, the US mission in Benghazi, Libya, was attacked by members of a terrorist militia group leading to the death of US Ambassador to Libya Christopher Stevens, information officer Sean Smith and two CIA operatives Glen Dohery and Tyrone Woods – former Navy SEALs.

Trump also spoke to Iraqi Prime Minister Adel Abdul Mahdi on Tuesday to demand that Iraqi security forces protect the embassy and the US diplomatic staff inside.

Thanks to our great leader & strong military! No Benghazi with this man in office! @realdonaldtrump