❀ The Two Rak‘ahs of Tahiyyat al-Masjid (Greeting the Mosque) ❀
✦ Authored by: Imran Ayyub Lahori
The Messenger of Allah ﷺ said:
"إذا دخل أحدكم المسجد فلا يجلس حتى يصلى ركعتين"
“When one of you enters the mosque, let him not sit until he has prayed two rak‘ahs.”
[Bukhari: 444, 1163; Abu Dawood: 467; Nasai: 2/53; Ibn Majah: 1013; Ahmad: 5/259; Ibn Khuzaymah: 1825; Ibn Hibban: 2496]
When he entered the mosque to collect the price of his camel from the Prophet ﷺ, the Prophet instructed him:
"أن يصلى الركعتين"
“To perform two rak‘ahs.”
[Muslim: 715; Bukhari: 2097]
During the Friday sermon, Sulaik al-Ghatafani (رضي الله عنه) sat down without praying. The Prophet ﷺ ordered him:
"أن يصليهما"
“To perform two rak‘ahs.”
[Bukhari: 443; Muslim: 875]
There is scholarly disagreement regarding whether these two rak‘ahs are obligatory or recommended:
✔ Ahl al-Zahir:
As quoted by Ibn Battal (رحمه الله), they held the view that it is obligatory.
[Tuhfat al-Ahwadhi: 2/265]
✔ Majority of Scholars (Jumhoor):
They regard it as recommended (mustahabb).
[ibid.]
✔ Imam San‘ani (رحمه الله):
“The apparent position is that it is obligatory.”
[Subul al-Salam: 1/366]
✔ Imam Shawkani (رحمه الله):
After discussing the evidences, he leans towards the Zahiri view of obligation.
[Nayl al-Awtar: 2/292]
✔ Preferred Opinion (راجح):
According to the stronger view, Tahiyyat al-Masjid is not obligatory, rather it is a Sunnah Mu’akkadah and a highly recommended practice.
And Allah knows best.
"هل علي غيرها؟"
“Is there anything obligatory upon me besides these?”
The Prophet ﷺ replied:
"لا ، إلا أن تطوع"
“No, unless you do voluntary acts.”
[Bukhari: 46]
"كان أصحاب رسول الله صلى الله عليه وسلم يدخلون المسجد ثم يخرجون ولا يصلون"
“The companions of the Messenger of Allah ﷺ would enter the mosque and then leave without praying (Tahiyyat al-Masjid).”
[Ibn Abi Shaybah: 3428]
He entered the mosque and sat in front of the Prophet ﷺ. The Prophet did not instruct him to perform two rak‘ahs.
[Bukhari: 4418]
"اجلس فقد آذيت"
“Sit down, for you have caused harm.”
He did not command him to pray.
[Sahih Abu Dawood: 989; Ahmad: 4/118; Abu Dawood: 1118; Ibn Khuzaymah: 1811]
✔ Ibn Hajar (رحمه الله):
The consensus among jurists who issue fatwas is that the command in this Hadith indicates recommendation, not obligation.
[Fath al-Bari: 1/640]
✔ Ibn Hazm (رحمه الله):
These two rak‘ahs are not obligatory.
[Nayl al-Awtar: 2/291]
✔ Imam Nawawi (رحمه الله):
There is consensus of the Muslims on the non-obligatory nature of this prayer.
[Sharh Muslim: 3/244]
✔ Ibn Qudamah (رحمه الله):
It is Sunnah to pray two rak‘ahs before sitting in the mosque.
[Al-Mughni: 2/554]
If someone forgets and sits down before offering these rak‘ahs, he should stand up and offer them when he remembers, then sit again. This is based on the Prophet ﷺ ordering someone during a sermon:
"قم فصل ركعتين"
“Stand up and pray two rak‘ahs.”
Likewise, when Abu Dharr (رضي الله عنه) entered the mosque and sat down, the Prophet ﷺ asked:
"أركعت ركعتين؟"
“Have you prayed two rak‘ahs?”
He replied, “No.”
The Prophet ﷺ said:
"قم فاركعهما"
“Then stand and pray them.”
[Fath al-Bari: 1/641; Ibn Hibban: Chapter on Tahiyyat al-Masjid Not Invalidated by Sitting]
If someone enters the mosque and the congregational prayer has already started, then he should join the Jama‘ah immediately. He does not need to pray Tahiyyat al-Masjid separately. Participation in the congregational prayer suffices.
"إذا أقيمت الصلاة فلا صلاة إلا المكتوبة"
“When the prayer has been established, no prayer is to be offered except the obligatory one.”
[Muslim: 710; Abu Dawood: 1266]
[See: Subul al-Salam: 1/367]
According to the Shafi‘is, Tahiyyat al-Masjid is permissible even during the prohibited times of prayer. However:
[For details, refer to: Nayl al-Awtar: 2/292; Tuhfat al-Ahwadhi: 2/266; Sharh Muslim: 3/244]
✔ Ibn Taymiyyah and Ibn al-Qayyim (رحمهما الله):
Consider Tahiyyat al-Masjid permissible at all times.
[Fatawa Ibn Baz (Urdu Trans.): 1/62]
✔ Shaykh Ibn Baz (رحمه الله) held the same view.
[ibid.]
✦ Authored by: Imran Ayyub Lahori
❖ Prophetic Instruction to Pray Two Rak‘ahs Upon Entering the Mosque
➊ Narration of
The Messenger of Allah ﷺ said:
"إذا دخل أحدكم المسجد فلا يجلس حتى يصلى ركعتين"
“When one of you enters the mosque, let him not sit until he has prayed two rak‘ahs.”
[Bukhari: 444, 1163; Abu Dawood: 467; Nasai: 2/53; Ibn Majah: 1013; Ahmad: 5/259; Ibn Khuzaymah: 1825; Ibn Hibban: 2496]
➋ Jabir (رضي الله عنه) narrated:
When he entered the mosque to collect the price of his camel from the Prophet ﷺ, the Prophet instructed him:
"أن يصلى الركعتين"
“To perform two rak‘ahs.”
[Muslim: 715; Bukhari: 2097]
➌ Jabir (رضي الله عنه) also reported:
During the Friday sermon, Sulaik al-Ghatafani (رضي الله عنه) sat down without praying. The Prophet ﷺ ordered him:
"أن يصليهما"
“To perform two rak‘ahs.”
[Bukhari: 443; Muslim: 875]
❖ Scholarly Views on the Ruling of Tahiyyat al-Masjid
There is scholarly disagreement regarding whether these two rak‘ahs are obligatory or recommended:
✔ Ahl al-Zahir:
As quoted by Ibn Battal (رحمه الله), they held the view that it is obligatory.
[Tuhfat al-Ahwadhi: 2/265]
✔ Majority of Scholars (Jumhoor):
They regard it as recommended (mustahabb).
[ibid.]
✔ Imam San‘ani (رحمه الله):
“The apparent position is that it is obligatory.”
[Subul al-Salam: 1/366]
✔ Imam Shawkani (رحمه الله):
After discussing the evidences, he leans towards the Zahiri view of obligation.
[Nayl al-Awtar: 2/292]
✔ Preferred Opinion (راجح):
According to the stronger view, Tahiyyat al-Masjid is not obligatory, rather it is a Sunnah Mu’akkadah and a highly recommended practice.
And Allah knows best.
❖ Evidences Supporting Non-Obligation
➊ The Prophet ﷺ informed
"هل علي غيرها؟"
“Is there anything obligatory upon me besides these?”
The Prophet ﷺ replied:
"لا ، إلا أن تطوع"
“No, unless you do voluntary acts.”
[Bukhari: 46]
➋ A narration states:
"كان أصحاب رسول الله صلى الله عليه وسلم يدخلون المسجد ثم يخرجون ولا يصلون"
“The companions of the Messenger of Allah ﷺ would enter the mosque and then leave without praying (Tahiyyat al-Masjid).”
[Ibn Abi Shaybah: 3428]
➌ In the incident of
He entered the mosque and sat in front of the Prophet ﷺ. The Prophet did not instruct him to perform two rak‘ahs.
[Bukhari: 4418]
➍ It is
➎ On one Friday, a man was pushing through the rows. The Prophet ﷺ said:
"اجلس فقد آذيت"
“Sit down, for you have caused harm.”
He did not command him to pray.
[Sahih Abu Dawood: 989; Ahmad: 4/118; Abu Dawood: 1118; Ibn Khuzaymah: 1811]
❖ Scholarly Consensus and Comments
✔ Ibn Hajar (رحمه الله):
The consensus among jurists who issue fatwas is that the command in this Hadith indicates recommendation, not obligation.
[Fath al-Bari: 1/640]
✔ Ibn Hazm (رحمه الله):
These two rak‘ahs are not obligatory.
[Nayl al-Awtar: 2/291]
✔ Imam Nawawi (رحمه الله):
There is consensus of the Muslims on the non-obligatory nature of this prayer.
[Sharh Muslim: 3/244]
✔ Ibn Qudamah (رحمه الله):
It is Sunnah to pray two rak‘ahs before sitting in the mosque.
[Al-Mughni: 2/554]
❖ If One Forgets to Pray and Sits Down
If someone forgets and sits down before offering these rak‘ahs, he should stand up and offer them when he remembers, then sit again. This is based on the Prophet ﷺ ordering someone during a sermon:
"قم فصل ركعتين"
“Stand up and pray two rak‘ahs.”
Likewise, when Abu Dharr (رضي الله عنه) entered the mosque and sat down, the Prophet ﷺ asked:
"أركعت ركعتين؟"
“Have you prayed two rak‘ahs?”
He replied, “No.”
The Prophet ﷺ said:
"قم فاركعهما"
“Then stand and pray them.”
[Fath al-Bari: 1/641; Ibn Hibban: Chapter on Tahiyyat al-Masjid Not Invalidated by Sitting]
❖ If the Congregational Prayer Has Already Commenced
If someone enters the mosque and the congregational prayer has already started, then he should join the Jama‘ah immediately. He does not need to pray Tahiyyat al-Masjid separately. Participation in the congregational prayer suffices.
"إذا أقيمت الصلاة فلا صلاة إلا المكتوبة"
“When the prayer has been established, no prayer is to be offered except the obligatory one.”
[Muslim: 710; Abu Dawood: 1266]
[See: Subul al-Salam: 1/367]
❖ Ruling on Tahiyyat al-Masjid During Prohibited Times
According to the Shafi‘is, Tahiyyat al-Masjid is permissible even during the prohibited times of prayer. However:
- Imam Abu Hanifah, Imam Awza‘i, and Imam Layth (رحمهم الله) viewed it as disliked during those times.
- The stronger opinion is that it is better to avoid praying it during the prohibited times, even if permissibility is established.
[For details, refer to: Nayl al-Awtar: 2/292; Tuhfat al-Ahwadhi: 2/266; Sharh Muslim: 3/244]
✔ Ibn Taymiyyah and Ibn al-Qayyim (رحمهما الله):
Consider Tahiyyat al-Masjid permissible at all times.
[Fatawa Ibn Baz (Urdu Trans.): 1/62]
✔ Shaykh Ibn Baz (رحمه الله) held the same view.
[ibid.]