Should a Muslim pray the two rak'ahs of greeting the mosque upon entering it during a time when prayer is forbidden?
Scholars have differed on the issue of Tahiyyat al-Masjid (greeting the mosque prayer), and the correct view is that it is legislated at all times, including after Fajr and after Asr, due to the generality of the Prophet's (peace and blessings be upon him) saying: "When any of you enters the mosque, he should not sit down until he prays two rak'ahs." This prayer is among the prayers with a specific reason, like the circumambulation prayer (Salat al-Tawaf) and the eclipse prayer (Salat al-Kusuf), which are performed during all times of prohibition. The evidence for this is the Prophet's (peace and blessings be upon him) saying regarding the circumambulation prayer: "O Children of Abd Manaf, do not prevent anyone from circumambulating this House and praying at any hour they wish, whether by night or day," and his saying regarding the eclipse prayer: "Indeed, the sun and the moon are two signs among the signs of Allah; they do not eclipse for the death of anyone nor for his life."
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/13206