The mosque has a special attribution to Allah Almighty, and its basic purpose is the worship of Allah, remembrance and invocations, recitation of the Quran, and religious teaching and learning. To preserve this attribution and honour, the Prophet ﷺ specifically commanded that when a person enters the mosque, he should first pray two rak’ahs and then sit. These two rak’ahs are called Tahiyyat al-Masjid. The question is: if someone enters the mosque at a time that is generally considered disliked or prohibited for voluntary prayer, will these two rak’ahs still be prayed?
The Basic Hadiths and Their Evidences
A) The Hadith of Sahih Muslim (Hadith No.: 1655)
کتاب صلاۃ المسافرین و قصرہا، باب: استحباب تحیۃ المسجد برکعتین و کراھۃ الجلوس قبل صلاتہما و انھا مشروعة فی جمیع الاوقات
The Arabic text of the hadith (in brief): “عن أبي قتادة صاحب رسول اللہ صلی اللہ علیہ وسلم قال: دخلت المسجد ورسول اللہ صلی اللہ علیہ وسلم جالس بین ظہراني الناس… فقال رسول اللہ صلی اللہ علیہ وسلم: ما منعک ان ترکع رکعتین قبل ان تجلس؟… فإذا دخل أحدکم المسجد فلا یجلس حتی یرکع رکعتین.”
Translation: Abu Qatadah (may Allah be pleased with him) narrates that I entered the mosque while the Messenger of Allah ﷺ was sitting among the people, and I sat down as well. The Messenger of Allah ﷺ said: What prevented you from praying two rak’ahs (before sitting)? I said: O Messenger of Allah, I saw you and the people sitting, so I sat down (for that reason). The Messenger of Allah ﷺ said: When any of you enters the mosque, he should not sit until he has prayed two rak’ahs.
A narration with the same meaning is also reported in
in which the same point is repeated, that after entering the mosque one should not sit without praying two rak’ahs.
B) Supporting Evidence in Other Hadith Books
The same content is also reported in
,
, etc. The summary of all the hadiths is one: the general command of the Messenger of Allah ﷺ is that whenever anyone enters the mosque, he should first pray two rak’ahs and then sit.
The Disliked Times and Tahiyyat al-Masjid
Another narration of
itself
shows that praying has been prohibited at certain times, for example when the sun is rising, at the exact time of zawal (the sun’s zenith), or during the brief time when the sun is setting. But according to the overwhelming majority of jurists, this prohibition relates to “absolute voluntary prayers” or to prayers that have no specific cause. Since Tahiyyat al-Masjid is a prayer with a cause (the cause: entering the mosque), according to the majority it may be performed even during the disliked times.
This is also supported by the fact that the Prophet ﷺ commanded even the Companion who came during the Friday sermon to pray two rak’ahs before sitting. Although listening to the sermon is apparently obligatory, he ﷺ gave precedence to Tahiyyat al-Masjid (Bukhari, Hadith 930). Similarly, there is allowance to perform the funeral prayer, the prostration of recitation, a make-up prayer, and other such prayers during the time of prohibition as well, because behind them lies a particular cause or excuse.
Various Fiqh Explanations and Summary
- The majority of jurists (Imam al-Shafi’i, according to one narration Imam Ahmad, and most of the hadith scholars) say that Tahiyyat al-Masjid should be performed even during the disliked times. They say that the words of the Messenger of Allah ﷺ “إذا دخل أحدکم المسجد فلا یجلس…” are general, and no specification has been reported that one should not pray if it is such-and-such a time.
- According to Imam Abu Hanifah and Imam Malik (and according to one narration Imam Ahmad), any voluntary prayer is prohibited during the times of prohibition, but even according to these scholars, a concession is granted in some necessary prayers. In some Hanafi books there are statements of exception that Tahiyyat al-Masjid, the prostration of recitation, the funeral prayer, etc. may be performed, although a difference between the schools exists.
- Another evidence for the allowance is that even if the imam is delivering the sermon at the time of Friday prayer, it is the sunnah of the Messenger of Allah ﷺ that the one entering the mosque should pray two short rak’ahs and sit. So when this concession was given even during the sermon, the issue of the time of prohibition is much lighter than that.
- Many commentators on hadith (for example Imam al-Nawawi, Imam Ibn Battal, Hafiz Ibn Hajar, etc.) state explicitly that these two rak’ahs are not obligatory but recommended. If someone sat down by forgetfulness, it is still better that he stand up again and pray, because in the general command given by the Prophet ﷺ, no exception is seen for omitting the prayer after having sat down.
Excerpts from Fatwas on the Topic
A) Islam Q&A (IslamQA.info), Arabic
It is written in
:“تحية المسجد من ذوات الأسباب، فيجوز أداؤها ولو في أوقات النهي، لأن النبي صلى الله عليه وسلم علَّقها بسبب الدخول إلى المسجد دون تخصيص وقت، فالأصل هو العمل بالعموم…”
Translation: “Tahiyyat al-Masjid is a prayer with a cause, so it is permissible to perform it even during the times of prohibition. The reason is that the Prophet ﷺ linked it to the cause of entering the mosque, and did not exempt any particular time for it. Therefore, the principle is to act upon the generality of the hadith.”
B) IslamWeb (IslamWeb.net), Arabic
It is mentioned in
and elsewhere:“إن صلاة تحية المسجد تصلى في كل وقت، حتى في الأوقات التي ينهى عن الصلاة فيها، لأنها صلاة لها سبب…”
Translation: “Tahiyyat al-Masjid is prayed at every time, even at the times in which voluntary prayer is generally prohibited, because it is a prayer that has a cause.”
Some Additional Points (Benefits and Rulings)
A) If someone prays an obligatory prayer or a confirmed sunnah, etc., the reward of Tahiyyat al-Masjid will be obtained by that very prayer. There is no need for two additional rak’ahs separately, because the purpose is to pray, with the intention of worship, as soon as one enters the mosque.
B) If someone has sat down and remembers that he has not performed Tahiyyat al-Masjid, he should get up and pray it. As is established from some narrations, the Prophet ﷺ told even the one who had sat down to stand and pray.
C) Regarding the Masjid al-Haram, some people of knowledge say that its greeting is the tawaf, especially when someone comes from outside the mosque. But if tawaf is not possible at some time, then he too should at least pray two rak’ahs of Tahiyyat al-Masjid.
D) Praying voluntary prayers in general during a prohibited time is forbidden, but there is a concession for prayers whose cause is clear and specific; for this reason, the funeral prayer, the prostration of recitation, Tahiyyat al-Masjid and the like are permitted.
Sources and References
-
Reference: Sahih Muslim, Kitab Salat al-Musafirin, hadiths: 714, 1655 etc. (numbering of Fu’ad Abd al-Baqi)
-
Reference: Sahih al-Bukhari, hadiths: 444, 1163, 1167 etc.
-
Reference: Sunan al-Nasa’i, hadith: 731
-
Reference: Sunan Abi Dawud, hadith: 467
-
Reference: Sunan Ibn Majah, hadith: 1013
-
Reference: Muwatta Imam Malik (narration of Ibn al-Qasim), hadith: 148
-
Reference: Islam Question and Answer (IslamQA.info), Arabic, fatwa no.: 33790
-
Reference: Islam Web (Islamweb.net), Arabic, fatwa no.: 12583
-
Reference: Other books of hadith commentary: Fath al-Bari, Sharh al-Nawawi ala Sahih Muslim, Nayl al-Awtar, Tuhfat al-Ahwadhi etc.
Concluding Words
This is the general and emphasised command of the Prophet ﷺ: when someone enters the mosque, he should pray two rak’ahs before sitting. This very act is a sign of the greatness and reverence of the mosque. According to the majority of the people of knowledge, this prayer of Tahiyyat al-Masjid can be performed even during prohibited times, because it is among the prayers that have a cause (dhawat al-asbab). If someone has sat down by mistake, he can stand up and pray it even after sitting. Along with this, it should also be remembered that if someone prays some other obligatory prayer or a confirmed sunnah in the meantime, Tahiyyat al-Masjid will also be fulfilled. This is the overall summary of our elder muhaddithin and fuqaha.