BEIRUT (Reuters) - Syrian and allied forces backed by Russian air strikes drove Islamic State militants out of the town of al-Qaryatain on Sunday after encircling it over the past few days, Syria’s military command said.

Surrounded by hills, al-Qaryatain is 100 km (60 miles) west of the ancient city of Palmyra, which government forces recaptured from Islamic State last Sunday.

Al-Qaryatain had been held by the militant group since late August. Syrian President Bashar al-Assad has been trying to retake al-Qaryatain and other pockets of Islamic State control to reduce the jihadist group’s ability to project military power into the heavily populated western region of Syria, where Damascus and other main cities are located.

Syrian state television said the army and its allies “fully restored security and stability to al-Qaryatain after killing the last remaining groups of Daesh terrorists” in the town, using the Arabic acronym for Islamic State.

In a statement read out on Syrian television, the military command said this was a strategic victory which secures oil and gas routes between the Damascus area and oilfields in eastern Syria. It also disrupts Islamic State supply routes within Syria.

Government forces entered the town from a number of directions, Syrian media said. A Syrian military source told SANA state news agency the army had cleared areas northwest of the town of explosives planted by Islamic State.

Islamic State militants retreating from Palmyra laid thousands of mines which the Syrian army is now clearing before civilians can return.

The Syrian Observatory for Human Rights said government forces had taken over half the town and that fierce fighting continued between Assad’s troops and Islamic State to the north and southeast of al-Qaryatain.

The Britain-based Observatory, which monitors the five-year-old Syrian conflict through a network of sources on the ground, said more than 40 air strikes by Russian and Syrian planes hit areas near the town on Sunday.

When Islamic State took over al-Qaryatain last August it demolished a Christian monastery and took around 200 of the town’s residents prisoner, transferring some of them to the Syrian city of Raqqa, the group’s de facto capital.

Islamic State still has complete control over Raqqa and runs most of Deir al-Zor province in eastern Syria, which borders Iraq.

A fragile “cessation of hostilities” truce has held in Syria for over a month as the various parties to the conflict try to negotiate an end to Syria’s civil war.

But the truce excludes Islamic State and the al Qaeda-affiliated Nusra Front. Air and land attacks by Syrian and allied forces continue in parts of Syria where the government says the groups are present.

Fierce fighting that broke out over the weekend continues south of Aleppo near the main highway linking that city with the capital, Damascus. It began when rebels and Nusra Front mounted an offensive against government forces.