Source: Ahkam wa Masā’il – The Chapter of Mosques, Vol. 1, p. 106
❖ The Question
If a person enters the mosque during the prohibited times (when voluntary prayers are forbidden), should he perform two rakʿahs of Taḥiyyat al-Masjid before sitting, or not?
❖ The Answer
Alhamdulillāh, waṣ-ṣalātu wa-s-salāmu ʿalā Rasūlillāh. Ammā baʿd!
✿ Voluntary prayers without any cause are prohibited in the forbidden times.
✿ However, the two rakʿahs of Taḥiyyat al-Masjid are not without cause; rather, they are due to the reason of entering the mosque.
❖ The Status of Taḥiyyat al-Masjid
- According to some scholars, Taḥiyyat al-Masjid is wājib (obligatory), not just voluntary.
- According to others, it is Sunnah and not obligatory.
- The Prophet ﷺ commanded this prayer, as narrated:
«إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَرْكَعْ رَكْعَتَيْنِ قَبْلَ أَنْ يَجْلِسَ»
(Ṣaḥīḥ al-Bukhārī – Kitāb al-Ṣalāh, Bāb idhā dakhala al-masjid falyarkaʿ rakʿatayn)
“When one of you enters the mosque, let him not sit until he has prayed two rakʿahs.”
And in another narration:
«إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلَا يَجْلِسْ حَتَّى يُصَلِّيَ رَكْعَتَيْنِ»
(Ṣaḥīḥ al-Bukhārī – Kitāb al-Tahajjud, Bāb mā jāʾa fī al-taṭawwuʿ mathnā mathnā)
“When one of you enters the mosque, let him not sit until he has prayed two rakʿahs.”
❖ Clarification
✿ Taḥiyyat al-Masjid is not an independent prayer; it is fulfilled by any prayer performed after entering the mosque (two rakʿahs or more).
✿ If a person intends to perform another prayer, that suffices as Taḥiyyat al-Masjid.
✿ If no other prayer is being performed, then he should pray two rakʿahs specifically for Taḥiyyat al-Masjid.
✿ If one does not wish to pray at that moment, he should at least remain standing rather than sitting, thereby fulfilling the command of the Prophet ﷺ.
❖ Conclusion
Even during prohibited times, the two rakʿahs of Taḥiyyat al-Masjid are permissible since they are not without cause but linked to the specific reason of entering the mosque.
ھذا ما عندي، والله أعلم بالصواب