Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

BEIRUT — Syrian government forces recaptured Palmyra on Sunday, state media and a monitoring group said, inflicting a significant defeat on the ISIS militant group which had controlled the ancient city since May last year.

Syrian television quoted a military source saying the army and its militia allies took "complete control over the city of Palmyra.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Syrian Observatory for Human Rights said there was still gunfire in the eastern part of the city on Sunday morning but the bulk of the ISIS force had pulled out and retreated east, leaving Palmyra under President Bashar Assad's control.

For government forces, the recapture of Palmyra, following a three-week campaign by Syrian government forces backed by intensive Russian airstrikes, opens up much of Syria's eastern desert stretching to the Iraqi border to the south and ISIS heartland of Deir al-Zor and Raqqa to the east.

Related: ISIS Beheads Archaeology 'Pioneer' in Palmyra

Observatory director Rami Abdulrahman said 400 ISIS fighters died in the battle for Palmyra, which he described as the biggest single defeat for the group since it declared a caliphate in areas of Syria and Iraq under its control in 2014.

Palmyra is also home to some of the most extensive ruins of the Roman empire. It was designated a site of "outstanding universal value" by UNESCO, the United Nations cultural agency, which described the city as "one of the most important cultural centers of the ancient world."

Known as "Venice of the Sands," it was the crossroads for several civilizations and featured influences from ancient Rome, Greece and Persia. ISIS militants destroyed several monuments last year, but Syria's antiquities chief told Reuters on Saturday that other ancient landmarks were still standing.