#129: Praying on Different Floors in a Mosque


Assalamualaikum ustaz. There are some who prefer to pray on a different level of a mosque separately even when there are still empty spaces in the main prayer hall. Hope for an explanation on this matter.


Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.

The act of straightening and filling the saf is a commandment before a person prays. The reason is numerous hadiths mentioned the rewards of this act. Furthermore, this act is included in the sunnah matters that should be performed before prayer. [1]

Among the hadiths which state this is a narration from Ibn Umar RA, where the Prophet PBUH said:

وَمَنْ وَصَلَ صَفًّا وَصَلَهُ اللَّهُ، وَمَنْ قَطَعَ صَفًّا قَطَعَهُ اللَّهُ

“If anyone joins up a row God will join him up, but if anyone breaks a row God will cut him off.” [2]

This hadith discusses the importance of straightening the saf and filling the empty saf is included as straightening the saf. In Aun al-Ma’bud, the author stated when discussing this hadith that it means whoever enjoins the saf is someone who comes and fills the empty spaces in the saf. As for the meaning of Allah SWT enjoins him is Allah SWT enjoins His blessing to him. While whoever cuts the saf and let empty spaces be or placing something to prevent this (from the saf filled). Moreover, Allah will cut him means cutting him off from Allah SWT’s blessings and perfect protection. [3]

According to the above question, there are several matters that should be understood in answering this question. We start by listing the conditions of qudwah (following the imam) according to madhhab al-Syafie in general:

  1. The makmum’s position must not be ahead of the imam.
  2. The makmum must know the changes in the action of the imam.
  3. The makmum must set the intention to follow the imam.
  4. The makmum must follow the type of prayer the imam is performing which is the same form. [4]
  5. The makmum cannot contradict the imam in sunnah actions that clearly involves the movement of the body such as the sahwi and tilawah prostration.
  6. The makmum cannot contradict the imam for more than two requisites, whether he precede or late than the imam.
  7. Both the imam and makmum must jtima’ (gather) in one place. [5]

The condition of ijtima’ is different for a prayer performed in or out of the mosque. If it is in the mosque, among the conditions are that nothing is separating the makmum to reach the imam even though he has to reverse or turn away from the qibla. The reason is a mosque is built with the purpose of congregational prayer, thence every ruling of worship performed in it considers the situation for congregational prayer. [6]

Whereas for qudwah outside the mosque for one of them, whether it is the imam or makmum is outside the mosque, the conditions are as follows:

  • No separator prevents musyahadah (looking at the imam or makmum whose qudwah with the imam is valid)
  • There is no barrier for istiraq (the makmum can walk to the imam without reversing or turn away from the qibla)
  • Does not exceed 300 dzira’ between the imam in the mosque and the makmum outside. [7]

Furthermore, Imam al-Nawawi also said: “A makmum must not precede the imam in terms of his position. If he is ahead of the imam, then his prayer is invalid according to qaul jadid. And does not harm (congregant) if he is in line with the imam and sunnah for him to be a little behind the imam and one considers this based on the position of the heel.” [8]

In answering the above question, we divide the situation as the following:

First: The Imam and Makmum Are in the Same Mosque

Imam Ibn Hajar al-Haitami stated in the chapter if the makmum and imam is in the same mosque: “It is valid through ijma’ although the distance is far and the building has a route and door that connects it.” [9]

Thus, based on the above-stated explanation, the qudwah of a makmum who follows an imam who is far from him in a mosque is valid on the condition that it is connected or has a route that he can walk through without any barrier.

Second: Makmum on the Rooftop of the Surrounding Building and the Imam is in the Mosque

Imam al-Nawawi said: “If the makmum is on a high platform and the imam is at ground level or vice versa, (the qudwah is valid) on the condition that some parts of the makmum are in line with the position of the imam’s body.” He further said: “It is makruh if the position of the makmum is higher than the imam or vice versa, except when there is a need, then it is sunnah.” [10]

Whereas, Imam Ibn Imad said: “If one prays on the rooftop outside of the mosque then him following the imam is invalid for he is on a different building and the imam and makmum is not in line. Such is stated by Syeikh Abu Muhammad, if a makmum stands in the mosque’s courtyard, then the ruling is the same as a mosque. As for the yard outside of the mosque, Imam al-Rafi’e said the jumhur scholars said that it is just like the mosque and makmum following the imam is valid.” [11]


According to the above argument, in our opinion if there is still space in the main prayer hall, then it should be filled first according to the hadith narrated by Anas bin Malik RA where the Prophet PBUH said:

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

“Straighten your rows, for the straightening of the rows is part of prayer.” [12]

The reason is the main prayer hall is the place of prayer and it should be filled first.

However, if the guard who was on duty has to pray far from the main prayer hall because he is on duty, then we state that his prayer is valid and he is given facilitation in terms of filling the saf.

Wallahu a’lam.


[1] See al-Taqrirat al-Sadidah, pg. 236

[2] Narrated by Abu Daud (666) dan Ahmad (5724)

[3] See ‘Aun al-Ma’bud, 258/2

[4] For example, it is impermissible for a person performing the obligatory prayer to follow an imam who is performing the sunnah funeral or eclipse prayer and vice versa. (Refer al-Taqrirat al-Sadidah, pg. 296)

[5] The reason is different buildings obligate iftiraq (separation of place). See Tuhfah al-Muhtaj (2/316).

[6] See al-Majmu` Syarh al-Muhazzab, 4/307; al-Bayan by al-Imrani, 4/139 and al-Mughni by Ibn Qudamah, 2/152

[7] See al-Taqrirat al-Sadidah, pg. 295-297; Nail al-Raja’, pg. 147

[8] See Minhaj al-Talibinpg. 40

[9] See Tuhfah al-Muhtaj, 2/313

[10] See Minhaj al-Talibin, 1/41

[11] See al-Qaul al-Tam Fi Ahkam al-Makmum wa al-Imampg. 90

[12] Narrated by al-Bukhari (723)