Praying in Masjid al-Haram: Qunut, Sujud al-Tilawah and Jama‘ for Shafi‘i Followers

How Shafi‘i followers pray behind the imams of Masjid al-Haram: qunut in Fajr, sujud al-tilawah, the basmalah, travellers’ rak‘ahs and the rows.

This is a complete guide to praying in congregation in Masjid al-Haram for followers of the Shafi‘i school: qunut in Fajr, sujud al-tilawah, the basmalah, how many rak‘ahs a traveller prays behind the imam, and the etiquette of the rows, based on the Federal Territory Mufti Office (Malaysia) and the books of the Shafi‘i school. May this guide help you, in sha Allah.

Editorial review: 16 October 2026 · English edition: 4 December 2026 · Expert fiqh review: in progress · Main references: the Federal Territory Mufti Office (Malaysia), Tuhfat al-Muhtaj (Ibn Hajar al-Haytami), Fath al-Mu‘in and Sahih al-Bukhari.

Summary

Follow the imam in every movement. The imams of Masjid al-Haram and Masjid an-Nabawi usually follow the Hanbali school, so a Shafi‘i follower will meet three differences: the imam does not recite qunut in Fajr (your prayer is still valid), the imam sometimes makes sujud al-tilawah in the middle of the recitation (you must follow), and the imam does not recite the basmalah aloud (you still recite al-Fatihah yourself).

If you are a traveller, pray the full four rak‘ahs with the imam. Praying in your hotel room following the imam’s voice is not valid as a congregational prayer. Find your situation in the box below. Travellers praying behind a resident imam are also explained in the guide to jama‘ and qasr of Zuhr and Asr.

Find your situation

Congregational Prayer in Masjid al-Haram: What Is Different

This guide applies in Masjid al-Haram and Masjid an-Nabawi. The situations are arranged in the order of the prayer: before the takbir, during the prayer, after the salam, then the number of rak‘ahs for travellers. Tap the situation you are facing.

If this happens

What should I do?

qunut, hotel, sujud, jama‘

Before the prayer

the rows inside the mosque are full and you are in the courtyard or on the street Valid with conditions

Stand behind an existing row. Make sure the row in front of you is close and that no wall or building separates you from it.

Outside the mosque building, your distance from the edge of the mosque must not exceed about 300 cubits (roughly 150 metres), nothing must block your view of the imam or the rows, and you must be able to walk towards the imam without turning away from the direction of the qiblah (Irsyad al-Fatwa Series 495).

you want to pray in your hotel following the imam’s voice Not valid to follow the imam

Do not make the intention of following the mosque imam from your hotel room. Pray on your own, or in congregation with your roommates with one of you leading.

A hotel room is outside the mosque and separated by walls. Hearing the loudspeaker or a live broadcast is not enough to follow the imam according to the Shafi‘i school (Irsyad al-Fatwa Series 495, and NU Online).

you are closer to the Kaaba than the imam Valid

It is valid if you are on another side of the Kaaba, not on the same side as the imam. If you are on the imam’s side, do not stand in front of him (al-Majmu‘ 4/299).

you are a woman and have to stand in the men’s rows Valid, disliked

Look for the women’s prayer area first. If crowding forces you, your prayer and that of the men beside you are still valid, but it is disliked (makruh) according to the majority of scholars, including the Shafi‘is (al-Mawsu‘ah al-Fiqhiyyah al-Kuwaitiyyah 6/21).

During the prayer

the imam does not recite the basmalah aloud Prayer valid

Carry on. Recite al-Fatihah yourself quietly, starting with the basmalah, in every rak‘ah, including Fajr, Maghrib and Isha.

In the Shafi‘i school, the follower must recite al-Fatihah even when the imam recites it aloud. If you were with the imam from the start of the rak‘ah and he bows before you finish, complete al-Fatihah first, then catch up with him (Al-Kafi #872). This allowance holds as long as you do not fall behind by more than three long pillars (the bowing and the two prostrations). If the imam has already stood for the next rak‘ah or sat for the tashahhud, leave the rest of the recitation, follow the imam, and add one rak‘ah after he gives salam (Tuhfat al-Muhtaj).

the imam goes straight into sujud without qunut in Fajr Prayer valid

Choose one: follow the imam straight into sujud, or quietly recite a short qunut yourself before going down, for example اللَّهُمَّ اغْفِرْ لِي يَا غَفُورُ (Allāhummaghfir lī yā Ghafūr, “O Allah, forgive me, O Most Forgiving”). Recite it only if you can still prostrate with the imam. If not, leave it.

This short wording is enough because it contains a dua and praise, which is the condition for a substitute for qunut (Mukhtasar Tuhfat al-Muhtaj 1/189, quoting al-Nihayah).

After the imam gives salam, it is sunnah to make the two prostrations of forgetfulness (sujud al-sahw) before you give salam. You may leave them and your prayer is still valid, because qunut is a sunnah ab‘ad, not a pillar (Tuhfat al-Muhtaj 2/171).

If a funeral prayer is announced straight away, you may leave this sujud al-sahw and give salam immediately, so that you can make the first takbir with the imam.

How to perform sujud al-sahw

the imam says takbir and goes into sujud in the middle of the recitation Must follow

Follow the imam in one prostration, then stand up again with him. Do not bow. If unsure, look at the rows in front: if they go straight into sujud, it is sujud al-tilawah.

If you deliberately do not follow the imam, your prayer is invalid. If you did not notice until the imam has already risen, do not prostrate. Continue standing. Do not make sujud al-tilawah on your own if the imam does not (Fath al-Mu‘in).

This commonly happens in Fajr on Friday, because the Prophet ﷺ recited Surah al-Sajdah and al-Insan in that prayer (Sahih al-Bukhari, no. 891).

After the salam

a funeral prayer is announced after the salam Communal obligation

Stay in your row. Stand up and make the takbir with the imam. You do not need to know whether the deceased is male or female. If you joined late, complete your own rak‘ahs first. Do not break off the obligatory prayer to join the funeral prayer. The niyyah and what to recite after each takbir are in the guide to the janazah prayer in Makkah and Madinah.

you want to pray the rawatib sunnah After the funeral prayer

Wait until the funeral prayer is over, then pray the ba‘diyyah rawatib where you are. Its time continues until the time of that obligatory prayer ends.

Guide to the rawatib sunnah prayers

Travellers: how many rak‘ahs?

you are a traveller praying behind the imam Pray in full

Pray four rak‘ahs with the imam. Do not shorten. A travelling follower who follows an imam praying in full, even for a moment, must complete his prayer in full (Tuhfat al-Muhtaj, chapter on the traveller’s prayer).

you intend to stay four full days or more Resident

Your traveller status ends as soon as you arrive. Pray in full without jama‘ or qasr, including in your hotel.

The day of arrival and the day of departure are not counted. Example: arrive on Monday, leave on Saturday. Tuesday to Friday are four full days, so you are a resident (Tuhfat al-Muhtaj, and Al-Kafi #255).

you stay less than four full days Jama‘ and qasr allowed

You are still a traveller, because your journey from home is more than two marhalah (about 81 km). Jama‘ and qasr are allowed when you pray alone or in congregation with other travellers. With the mosque imam, still pray in full.

you are a Hajj pilgrim going back and forth to Mina and Arafah Ask your guide

Working out residence for Hajj pilgrims involves the time spent in Mina and Arafah and differs according to the schedule. Follow the briefing of your Hajj guide or operator.

All the answers above follow the Shafi‘i school. The basic principle: if in doubt during the prayer, follow the imam.

Comparing the schools

Qunut in Fajr According to the Four Schools

The imams of Masjid al-Haram and Masjid an-Nabawi do not recite qunut in Fajr because they follow a school that does not consider it a regular sunnah. This difference is a recognised difference of opinion, not a mistake by the imam.

SchoolQunut in Fajr
Shafi‘iSunnah ab‘ad, after the bowing of the second rak‘ah. If it is left, sujud al-sahw is sunnah.
MalikiRecommended, recited quietly before the bowing.
HanafiNot in Fajr. Qunut is only in the witr prayer.
HanbaliNot recited, except qunut al-nazilah when the Muslim ummah is struck by calamity.

A Shafi‘i follower does not have to copy the imam’s practice in this sunnah matter, and does not need to repeat the prayer. The full wording of the qunut dua is in the guide to the qunut dua.

Etiquette

Etiquette of the Rows and Walkways in Masjid al-Haram

سَوُّوا صُفُوفَكُمْ، فَإِنَّ تَسْوِيَةَ الصُّفُوفِ مِنْ إِقَامَةِ الصَّلَاةِ

“Straighten your rows, for straightening the rows is part of establishing the prayer.”

Sahih al-Bukhari, no. 723

  • Come early. The rows fill up long before the adhan, especially for Maghrib, Isha and the Friday prayer.
  • Fill the front rows first and stand shoulder to shoulder with those beside you.
  • Follow the instructions of the mosque staff. Do not pray in walkways kept clear for pilgrims, on escalators or at emergency exits.
  • Do not pass in front of someone who is praying if there is another way.
  • Women: use the marked women’s prayer areas, and come early because they fill up quickly.

Q&A

Frequently Asked Questions

Is Fajr valid behind an imam of Masjid al-Haram who does not recite qunut?

Yes. In the Shafi‘i school, qunut in Fajr is a sunnah ab‘ad, not a pillar. The follower may simply follow the imam, or recite a short qunut himself if he can still prostrate with the imam. After the imam gives salam, it is sunnah to make sujud al-sahw before giving salam.

Do I need to make sujud al-sahw if the imam does not recite qunut?

It is sunnah, not obligatory. Make two prostrations after the imam gives salam, then give your own salam. If you leave it, your prayer is still valid. If a funeral prayer is announced straight away, leave the sujud al-sahw and give salam immediately so that you can make the first takbir with the imam.

Can I pray in my hotel following the imam of Masjid al-Haram over the loudspeaker?

It is not valid to follow him as an imam according to the Shafi‘i school, because the hotel room is outside the mosque and separated by walls. Pray on your own or in congregation with your roommates.

Can Umrah pilgrims combine and shorten prayers in Makkah?

Yes, if you intend to stay less than four full days, not counting the days of arrival and departure. If it is four full days or more, you are a resident and pray in full. With the mosque imam, a traveller still prays in full.

Why does the imam prostrate in the middle of the Fajr recitation on Friday?

That is sujud al-tilawah. The imam usually recites Surah al-Sajdah in Fajr on Friday, following the sunnah of the Prophet ﷺ. The follower must follow the imam into sujud, then stand up again.

Sources

References

  1. Sahih al-Bukhari, no. 891: reciting Surah al-Sajdah and al-Insan in Fajr on Friday. sunnah.com
  2. Sahih al-Bukhari, no. 723: straightening the rows. sunnah.com
  3. Federal Territory Mufti Office (Malaysia), Irsyad al-Fatwa Series 495: the ruling on performing the Friday prayer via live streaming (15 April 2020, in Malay): the conditions for following an imam outside the mosque. muftiwp.gov.my
  4. Federal Territory Mufti Office (Malaysia), Al-Kafi #872: a follower who forgets to recite al-Fatihah in congregation (31 October 2018, in Malay). muftiwp.gov.my
  5. Federal Territory Mufti Office (Malaysia), Al-Kafi #255: The Meaning of Musafir, Muqim and Mastautin for Jamak and Qasar (22 April 2016). muftiwp.gov.my
  6. Mustafa Sumait, Mukhtasar Tuhfat al-Muhtaj, vol. 1: the condition for a substitute for qunut, dua and praise, quoting al-Nihayah (p. 189, footnote) shamela.ws, qunut when the imam leaves it (p. 233) shamela.ws, the intention of residence for four days (p. 304) shamela.ws, and a traveller following an imam who prays in full (p. 309) shamela.ws.
  7. Amjad Rasheed, Imam’s Omission of the Du‘a of Qunut (Qibla): the follower’s qunut, the short wording and sujud al-sahw. islamqa.org
  8. NU Online, Is the prayer of a follower who does not follow the imam’s sujud al-tilawah invalid? (in Indonesian), quoting Fath al-Mu‘in. nu.or.id
  9. NU Online, The ruling on praying in a hotel in congregation with the imam of Masjid al-Haram (in Indonesian). nu.or.id
  10. NU Online, Differences among the jurists on qunut in Fajr (in Indonesian). nu.or.id
  11. NU Online, The ruling on praying in mixed rows of men and women (in Indonesian), quoting al-Mawsu‘ah al-Fiqhiyyah al-Kuwaitiyyah 6/21. nu.or.id
  12. Al-Durar al-Saniyyah, al-Mawsu‘ah al-Fiqhiyyah: a follower in front of the imam around the Kaaba, quoting al-Majmu‘ 4/299. dorar.net
  13. Dar al-Ifta’ al-Misriyyah, Hukm al-Jahr bi al-Basmalah fi al-Salah (in Arabic). dar-alifta.org

Written by

Muhamad Naim Abd Manaf

Founder of AkuIslam. Writing worship guides since 2010 in plain language, with references that are checked.

اِقْرَأْ أَيْضًا

Related Reading

Chosen based on this article

Share your thoughts or questions

Your email address will not be published. Required fields are marked *