The advance on Palmyra, also known as Tadmur, gave the Islamic State more control over the highway from the town to the eastern province of Deir al-Zour and parts of a sprawling gas field. It comes at a time when the government of President Bashar al-Assad has faced new challenges in the seemingly implacable civil war. A coalition of rival insurgent groups recently wrested the northern provincial capital of Idlib from government control.

The soldier, who asked not to be named for fear of government reprisals, had served with a Syrian government unit in Palmyra and said his comrades, trapped in Sukhna, called him when they were attacked.

“I could feel the fear in their voice,” he said. “They told me they ran out of ammunition.”

He said he later saw some of his fellow soldiers’ identification cards posted online by Islamic State fighters who participated in the battle.

Khaled al-Homsi, an antigovernment activist who monitors damage and looting of antiquities in Palmyra, said the sites had been threatened and damaged by fighters from all sides of the Syrian conflict.