Islamic State fighters in the border pocket accepted a truce and evacuation deal on Monday
Syrian President Bashar al-Assad gave prayers on Friday for Islam's Eid al-Adha festival in the town of Qara, near an enclave surrendered on Monday by Islamic State fighters.
Confined to Damascus for long periods in the early part of Syria's six-year civil war, Assad has grown more confident in travelling around government-held areas as the army and its allies have won a series of victories.
The departure of Islamic State and other groups from the Western Qalamoun district means the border with Lebanon is controlled entirely by Syria's army for the first time since the conflict.
The IS fighters who evacuated the district remained stuck in a convoy on Friday, two days after the US-led coalition against the militants used air strikes to block it from crossing into their main territory in eastern Syria.
"President Assad prayed on Eid al-Adha... in the town of Qara" in western Qalamoun, near Lebanon, the presidency tweeted, along with a picture of him kneeling in a mosque flanked by other officials.
— Syrian Presidency (@Presidency_Sy) September 1, 2017
State television showed footage of the Syrian leader smiling in the presence of his supporters inside the mosque in Qara.
Qara is only a few miles from the pale, dry mountains delineating the frontier with Lebanon, which Islamic State and other militant groups held until August.
The IS fighters in the border pocket accepted a truce and evacuation deal after simultaneous but separate offensives by the Lebanese army on one front and the Syrian army and Hezbollah on the other.
Part of an agreed exchange went ahead on Thursday as wounded IS fighters were swapped for bodies of pro-government forces.
But the fate of the main part of the convoy is uncertain after the coalition said it had seen the buses turning back into Syrian government territory on Thursday.
More than 330,000 people have died since Syria's conflict erupted in 2011 with anti-government protests.