An April image provided by the Russian Defense Ministry press service shows ancient ruins in Palmyra, Syria. (Associated Press)

Syrian troops pulled out of the ancient city of Palmyra on Sunday as Islamic State militants claimed they had regained full control of the area less than a year after being driven out.

Victory in the symbolically significant city would mark a startling reversal of the militant group’s fortunes after months of setbacks and suggests that the Islamic State remains a resilient force.

The Amaq news agency, which is linked to the Islamic State, claimed Sunday that the group had regained “full control” of Palmyra, while the Britain-based Syrian Observatory for Human Rights said President Bashar al-Assad’s troops had withdrawn to the south. 

The local governor, Talal al-Barazi, said that the decision had been made to prepare for a counterattack “in the coming days.”

Long considered one of the world’s greatest archaeological treasures, Palmyra’s ancient Roman complex was partly destroyed by the Islamic State during its earlier 10-month occupation of the nearby modern city.

The group ruled with an iron fist, repurposing an iconic amphitheater as a stage for executions and enacting brutal punishments against residents who broke laws it imposed.

Russian airstrikes facilitated the Syrian government’s recapture of Palmyra in March. This weekend, Moscow’s bombing raids pushed the militants back only briefly, forcing a dawn retreat from the city before they swept back in hours later.

A Syrian activist from Palmyra who uses the pseudonym Khaled al-Homsi said residents remaining inside the city as the militants swept in Sunday were among the area’s poorest. Barazi, the governor, said that no more than 15 percent of the local population had returned since the Islamic State’s previous occupation.

Palmyra was built as a tribute to the visiting Roman emperor Septimius Severus more than 2,000 years ago. Like many of the country’s ancient treasures, Palmyra’s ruins have been looted by government forces, damaged in fighting and airstrikes and shattered with dynamite during the Islamic State’s previous spell in power.

The group had been advancing steadily since Thursday while the government waged a major offensive against rebels in the northern city of Aleppo.

Under pressure across its self-declared “caliphate” in Syria and Iraq, the Islamic State appeared to be using the Palmyra attack in part as an opportunity to resupply its arsenal. Video footage by the group and news reports from pro-government reporters suggested that the group’s fighters had looted military weapons stocks.

The attack was also a reminder that the group’s defeat may be a long way off. The offensive coincides with a major U.S.-backed operation by the Iraqi government for the city of Mosul, where hopes for a swift victory against the Islamic State are fading as the militants put up a stiff fight. 

The group still controls large portions of Syria, including much of the vast eastern desert where Palmyra is located.

The U.S. military announced Saturday that it was sending an additional 200 Special Operations troops to northern Syria to help the mostly Kurdish force that is battling the militants there.

The assault on Palmyra also serves as a reminder that the Syrian army, despite substantial gains against rebel forces in recent weeks, is thinly spread, suffering from shortages of manpower and weary after more than five years of war.

The rebel-held eastern portion of Aleppo seems poised to be recaptured soon by government troops, who are being aided by Iranian advisers; Shiite militias from Iraq, Afghanistan and Lebanon; and Russian airstrikes. The government has also been making less-publicized advances against rebels around the capital, Damascus.

But in a pattern that has emerged throughout Syria’s war, gains on one front have meant drawing down troops on another, leaving government positions exposed. In Palmyra, a limited troop presence was all that remained when the Islamic State launched its assault, according to activists.

In a video published by Amaq on Saturday, Islamic State militants were seen routing army sniper positions, kicking soldiers’ corpses and waving military identification cards for the camera.

In an apparent attempt to save face, the Russian military blamed the militants’ advance on its pilots’ unwillingness to cause civilian casualties. Since launching bombing raids on Assad’s behalf in September 2015, the Russian air force has been accused by human rights groups of targeting civilian areas in most provinces across Syria.

Zakaria Zakaria in Istanbul and David Filipov in Moscow contributed to this report.