Question
If a person enters a mosque during the prohibited times (that is, the times in which it is forbidden to pray voluntary prayers), will he pray two voluntary rak’ahs (Tahiyyat al-Masjid) before sitting in the mosque or not?
Answer
الحمد لله، والصلاة والسلام علىٰ رسول الله، أما بعد!
✿ During the prohibited times, it is forbidden to pray a voluntary prayer that is performed without any cause or reason.
✿ But the two voluntary rak’ahs of Tahiyyat al-Masjid are, according to some scholars, obligatory, not voluntary, and according to others they are voluntary, not obligatory.
The status of Tahiyyat al-Masjid
✿ This prayer is not without a cause; rather, it is prayed because of entering the mosque.
✿ The Messenger of Allah ﷺ commanded the performance of this prayer, as mentioned in the hadith:
«إِذَا دَخَلَ أَحَدُکُمُ الْمَسْجِدَ فَلْیَرْکَع رَکْعَتَیْنِ قَبْلَ أَنْ یَجْلِسَ»
“When any of you enters the mosque, he should pray two rak’ahs before he sits.”
✿ In some narrations it also appears in this way:
«إِذَا دَخَلَ أَحَدُکُمُ الْمَسْجِدَ فَلاَ یَجْلِسْ حَتَّی یُصَلِّيَ رَکْعَتَیْنِ»
“When any of you enters the mosque, he should not sit until he has prayed two rak’ahs.”
Clarification
✿ The two rak’ahs of Tahiyyat al-Masjid are not a separate, independent prayer.
✿ Whatever prayer (of two or more rak’ahs) is prayed after entering the mosque, the intention of Tahiyyat al-Masjid will be included with it.
✿ However, if a person, after entering the mosque, is not praying any other prayer, then he should pray the two rak’ahs of Tahiyyat al-Masjid separately.
✿ And if a person does not wish to pray these two rak’ahs, he should remain standing instead of sitting, so that the command of the Messenger of Allah ﷺ is complied with.
ھذا ما عندي والله أعلم بالصواب