Question:
What is the ruling on Tahiyyat al-Masjid (the greeting prayer of the mosque)?
Answer:
Tahiyyat al-Masjid is recommended by consensus.
❀ Hafiz Ibn Abd al-Barr (may Allah have mercy on him)
says:
لا يختلف العلماء أن كل من دخل المسجد فى وقت يجوز فيه التطوع بالصلاة أنه يستحب له أن يركع فيه عند دخوله ركعتين قالوا: فيهما تحية المسجد وليس ذلك بواجب عند أحد.
“There is no disagreement among the people of knowledge that for whoever enters the mosque at a time when voluntary prayer is permissible, it is recommended to pray two rak’ahs. The people of knowledge say: These two rak’ahs are Tahiyyat al-Masjid, and this is not obligatory according to any scholar.”
❀ Hafiz al-Nawawi (may Allah have mercy on him)
says:
أجمع العلماء على استحباب تحية المسجد.
“The people of knowledge are agreed by consensus that Tahiyyat al-Masjid is recommended.”
❀ Hafiz Ibn al-Mulaqqin (may Allah have mercy on him)
says:
استحباب تحية المسجد بركعتين، وهى سنة بالإجماع.
“It is recommended to pray two rak’ahs with the intention of Tahiyyat al-Masjid; it is a sunnah by consensus.”
❀ Hafiz Ibn Hajar (may Allah have mercy on him)
says:
اتفق أئمة الفتوى على أن الأمر فى ذلك للندب.
“All the authorities of fatwa are agreed that the command regarding Tahiyyat al-Masjid is to be understood as recommendation.”