Syrian forces, backed by Russian air strikes, fought the Islamic State of Iraq and the Levant (ISIL) group out of the town of al-Qaryatain after gradually surrounding it over the past few days, state media said.
Surrounded by hills, al-Qaryatain is 100km west of the ancient city of Palmyra, which government forces recaptured from ISIL last Sunday.
Al-Qaryatain had been held by ISIL since late August. Syrian President Bashar al-Assad has been trying to retake al-Qaryatain and other pockets of ISIL control to reduce the group's ability to project military power into the heavily populated western region of Syria, where Damascus and other main cities are located.
State news agency SANA 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 acronym of ISIL's Arabic name.
Government forces entered the town from a number of directions, SANA reported. A Syrian military source told SANA that the army had cleared areas northwest of the town of explosives planted by ISIL.
READ MORE: 'Mass grave discovered' in Syria's recaptured Palmyra
ISIL fighters retreating from Palmyra laid thousands of mines which the Syrian army is now clearing before civilians can return.
The UK-based Syrian Observatory for Human Rights said government forces had taken over half the town and that fierce fighting continued between Assad's army and ISIL to the north and southeast of al-Qaryatain.
The observatory, which monitors the five-year-old Syrian conflict through a network of activists on the ground, said more than 40 air strikes by Russian and Syrian planes hit areas near the town on Sunday.
ISIL still has complete control over the city of Raqqa, its de facto capital, and it controls most of Deir Ezzor province in eastern Syria, which borders Iraq.
Syrian rebels and al-Nusra Front have mounted an offensive against Syrian government forces and on Saturday took a strategic hill south of Aleppo from government control, the observatory reported on Saturday.
The offensive began on Friday, and Syrian government and allied forces were fighting to take back control of the territory and repel further attacks.
A fragile "cessation of hostilities" truce has held in Syria for more than a month as the various parties try to negotiate an end to Syria's five-year-old civil war.
But the truce excludes ISIL and al-Nusra Front, and air and land attacks by Syrian and allied forces continue in parts of Syria where the government says the groups are present.
More than 250,000 people have been killed during the war in Syria and millions have fled the country.
Source: Al Jazeera and agencies