The Syrian military says it has recaptured Yabroud, the last rebel stronghold near the Lebanese border.
Government forces and Lebanese allies from the Hezbollah group have besieged the town for weeks, as part of a battle for control of key transport routes.
Separately, two Hezbollah members were killed in a car bomb in Lebanon's Bekaa Valley, near the border with Syria.
The Shia group has increasingly become the target of attacks over its involvement in the Syria conflict.
At least three people died in the suicide car bomb attack that struck a petrol station in Al-Nabi Othman village, security sources say.
'REVENGE FOR YABROUD'
A group calling itself the al-Nusra Front in Lebanon put out a statement on Twitter claiming to be behind the attack, saying it was "a quick response to the bragging and boasting of the party of Iran [Hezbollah] over their raping of Yabroud".
It is not clear what links the group has to the al-Nusra Front in Syria - an al-Qaeda-linked force fighting Assad's government.
Another extremist group - Liwa Ahrar al-Sunna in Baalbek - also claimed responsibility for the attack, describing it as "revenge for Yabroud".
The government launched an offensive in mid-November to oust rebel fighters from the Qalamoun mountains near the Lebanese border.
They recaptured the towns of Qara, Deir Attiya and Nabak, to the north-east of Yabroud along the motorway linking Damascus with the city of Homs.
In mid-February, Assad forces launched a full offensive on Yabroud, which had been controlled by the opposition for much of the three-year conflict.
"The crushing of the terrorist groups is a continuation of the successes made by the Syria army in Qalamoun," an unnamed military spokesman said on state television on Sunday.
"It completes an important circle in securing the border regions between Syria and Lebanon, and also cuts the supply roads."
Footage on Hezbollah's Al Manar TV channel showed handfuls of Syrian soldiers moving through Yabroud, where the streets were otherwise deserted.
Syrian state media said government forces had killed or captured many rebel fighters.
One fighter from the al-Nusra Front said they had decided to pull out and were heading towards nearby villages.
But some opposition sources said the government was not yet in total control, and that some fighters from extremist groups were still in the town and were prepared to fight to the death.
The BBC's Arab affairs editor Sebastian Usher says the government victory does not shift the effective stalemate in the fighting, but it does add to the sense that government forces are gaining momentum.
The bombardment of Yabroud and the fighting on its outskirts have forced much of its 40,000-strong population to flee, many to Lebanon.
More than 100,000 have been killed since the conflict between rebels and President Bashar al-Assad's forces began in March 2011.