Is the “Salat al-Tahiyat al-Masjid” (Two-Rak’ah Prayer upon Entering the Mosque) performed when entering the mosque to pray Maghrib and Fajr, after the dawn breaks?
If you enter the mosque shortly before sunset, it is preferable to wait for the sun to set to pray two rak'ahs, in order to avoid differing opinions. However, if you enter long before Maghrib, then pray Tahiyyat al-Masjid (greeting the mosque prayer).
Regarding Tahiyyat al-Masjid after Fajr al-Sadiq (true dawn), most scholars have disliked performing supererogatory prayers before it other than its Sunnah (the two rak'ahs of Fajr), citing the hadith: "Do not pray after Fajr except two prostrations (rak'ahs)." However, the Shafi'is, some Hanbalis, and many verifiers of Islamic law permitted the greeting prayer and other prayers that have a specific reason. The preponderant opinion is that supererogatory prayers that have a specific reason, such as Tahiyyat al-Masjid, are not included in the prohibition.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/31981