Large parts of Homs were once under the control of rebels fighting to overthrow Assad's regime but since May 2014 they have been confined to a single besieged neighbourhood in the city's outskirts.
Signup to our newsletter and follow us on Facebook and Twitter!
The Al-Safa mosque, where Assad joined worshippers, is in Akrama, a loyalist neighbourhood which has been hit by repeated attacks by the Islamic State group and its jihadist rival Al-Qaeda.
State television broadcast footage of the president in the congregation alongside Islamic Endowments Minister Mohammad Abdel-Sattar Sayyed and Syria's top Muslim cleric Ahmad Badredine Hassoun.
Since the civil war erupted in 2011, Assad has made only rare public appearances and nearly all of those have been in Damascus.