Islamic Fiqh > Prayer > Group prayer and the rules of the imam > The legal status of prayer in congregation
Contents
Updated on 25 September 2026 at 3:23 PM
This part belongs to the full section: All sections of this part.
Prayer in congregation occupies a central place in the structure of prayer in Islam. The jurists devoted a detailed study to it: its legal status, upon whom it is binding, the minimum number that forms it, its location, the repetition of the congregation, and the excuses that exempt from attending it. This page brings together the positions of the schools with their evidence, drawn from the classical sources of fiqh.
Whoever prays isha in congregation is like one who stood half the night in prayer; and whoever prays fajr in congregation is like one who prayed the whole night.Reported by Muslim (656), from Uthman ibn Affan
Because of its importance, Ibn al-Arabi said: prayer in congregation is the pillar of the religion and the banner of Islam; if the people of Egypt abandoned it they would be fought, and the people of a district would be compelled and forced to observe it (at-Taj wa-l-Iklil, 2/81; al-Ifsah, 1/203).
The jurists differed over the status of prayer in congregation according to 3 opinions.
First opinion: an obligation upon each individual. The Hanafis, the Hanbalis, Ibn al-Mundhir and Ibn Khuzaymah among the Shafi'is hold that prayer in congregation is obligatory upon every individual, except under an excuse, without being a condition for the validity of the prayer. This is the explicit text of Imam al-Shafi'i in Mukhtasar al-Muzani (1/21): "As for the congregation, I grant no concession for abandoning it except under an excuse." They argue from the Quran, the Sunnah and the transmission of the community.
The first verse cited is the saying of Allah:
"Establish prayer, give zakat, and bow with those who bow."
Surah al-Baqarah, 43
Allah commanded bowing with those who bow, which is only realized through sharing the bowing: this is therefore a command to establish prayer in congregation. And the absolute imperative denotes obligation (Mu'ani al-Athar, 1/488).
The second verse is that of the prayer in a state of fear:
"When you are among them and lead them in prayer, let a group of them stand with you, carrying their arms; then, when they have prostrated, let them go behind you, and let another group come that has not prayed and pray with you."
Surah an-Nisa', 102
The reasoning from this verse is threefold. First, had congregational prayer not been obligatory, there would have been no concession in the state of fear, for the obligations of the prayer may not be neglected on its account. Second, the command of congregation in the state of fear indicates that in the state of security it is even stronger. Third, Allah commanded the congregation to the first group, then repeated that command for the second: "and let another group come that has not prayed and pray with you."
This proves that congregation is an obligation upon each individual, since Allah did not remove it from the second group by the act of the first. Had it been a recommendation, the excuse of fear would be the most apt to remove it; and had it been a collective obligation, the act of the first group would have removed it. The verse therefore contains 3 successive commands, without any concession for abandoning it even in fear (al-Mughni, 2/377; as-Salah wa hukm tarikiha by Ibn al-Qayyim, 138).
The third verse:
"The day the shin will be uncovered and they will be called to prostrate, but they will not be able; their eyes humbled, humiliation covering them, while they had been called to prostrate while they were sound."
Surah al-Qalam, 42-43
Allah prevented them from prostrating because they refused to answer the call to prostration in this world. Answering the call in this world means coming to the mosque for the congregation, not praying alone at home: the Prophet (peace be upon him) himself explained the answering thus.
A blind man came to the Prophet and said: O Messenger of Allah, I have no guide to lead me to the mosque. He therefore asked the Messenger of Allah for a concession to pray in his house, and he granted it. Hardly had he left when the Prophet called him and said: do you hear the call to prayer? He said: yes. He said: answer it.Reported by Muslim (653), from Abu Hurayrah
The blind man was therefore not permitted to pray at home when he hears the call: the commanded answer is precisely coming to the mosque for the congregation. The hadith of Ibn Umm Maktum points the same way: he said: O Messenger of Allah, Madinah abounds in vermin and wild beasts. The Prophet said to him: do you hear "Come to prayer, come to success"? He said: yes. He said: "Answer, then!", and did not grant him a concession (authentic hadith reported by Abu Dawud, 553, and an-Nasa'i, 851). The expression "answer, then" is an imperative whose meaning is: come and answer; it shows that the answer is made by attending the congregation, and that whoever abandons it has not answered (as-Salah wa hukm tarikiha, 139).
Among the proofs from the Sunnah is the hadith of Abu Hurayrah:
By Him in whose hand is my soul, I intended to order that firewood be gathered, then to order the prayer and have the adhan called for it, then to order a man to lead the people in prayer, then to set upon men and burn their houses over them. By Him in whose hand is my soul, if any one of them knew that he would find a fat bone or 2 morsels of mutton, he would attend isha.Reported by al-Bukhari (644) and Muslim (651)
The Prophet's resolve to burn the houses of those who neglect congregational prayer over them is a manifest proof of its obligation upon the individual: it is not conceivable that the Messenger of Allah should threaten with punishment one who neglects a sin, or something that is not obligatory. The hadith of Abu Hurayrah confirms this: the Prophet said of a man who left the mosque after the adhan: "That one has disobeyed Abu al-Qasim" (reported by Muslim, 655). Had a man been free to attend the congregation or not, it would not be permitted to say of one who neglects something not obligatory that he has disobeyed.
The second pillar of evidence is the story of the blind man already mentioned: he is Ibn Umm Maktum, whose name is a matter of dispute: Abdallah or Amr. In the Sunan of Abu Dawud, Amr ibn Umm Maktum says:
O Messenger of Allah, I am a man of defective sight, with a sprawling dwelling, and my guide does not suit me: do I have a concession to pray in my house? He said: do you hear the call? He said: yes. He said: I find no concession for you.Authentic hadith, reported by Abu Dawud (552)
Ibn al-Qayyim said: the upholders of obligation hold that the absolute imperative denotes obligation; all the more so when the Lawgiver explicitly declares that there is no concession for a servant to neglect the congregation, even a blind man with a sprawling dwelling whose guide does not suit him. Had the servant been free to pray alone or in congregation, the blind man would be the first of all to deserve such an option. Abu Bakr Ibn al-Mundhir said: the mention of attending the congregation being required of the blind, however far their homes may be from the mosque, proves that attending the congregation is an obligation and not a recommendation; and if the Prophet said to the blind Ibn Umm Maktum: "I find no concession for you", the sighted man has all the more right not to have one (as-Salah wa hukm tarikiha, 145; al-Awsat of Ibn al-Mundhir, 4/132).
The third testimony is the hadith of Abdallah ibn Mas'ud:
Whoever is pleased to meet Allah tomorrow as a Muslim, let him uphold these prayers where they are called for: Allah has laid down for your Prophet the traditions of guidance, and these are among them. If you were to pray in your houses as this negligent one prays in his house, you would abandon the tradition of your Prophet; and were you to abandon the tradition of your Prophet, you would go astray. There is no man who performs ablution well, then sets out for one of these mosques, but Allah records for him a good deed for every step he takes, raises him a degree thereby, and erases a sin from him. In our time, we saw none neglect these prayers but a hypocrite whose hypocrisy was well known: a man was even brought to the row supported between 2 men. In another version: the Messenger of Allah taught us the traditions of guidance, and prayer in the mosque where the adhan is called is among them.Reported by Muslim (654)
Ibn al-Qayyim draws from it the following argument: the Companion made abandoning the congregation one of the signs of hypocrites whose hypocrisy is well known; yet the signs of hypocrisy can be neither the abandonment of a recommendation nor the doing of a disliked act. Whoever surveys the signs of hypocrisy in the Sunnah finds them all in leaving an obligation or committing a forbidden act. The meaning is confirmed by the phrase "whoever is pleased to meet Allah tomorrow as a Muslim, let him uphold these prayers where they are called for", and by the fact that the one who prays at home is there called a "negligent one" who has left a tradition, that is, the way of the Messenger of Allah.
This is not the kind of tradition whose doing is optional and whose abandonment entails neither misguidance nor a sign of hypocrisy, such as the duha prayer, the night vigil, or the fast of Monday and Thursday (as-Salah wa hukm tarikiha, 146-147; the rest of the evidence in this chapter has been left out for brevity).
As for the transmission of the community, al-Kasani formulates it thus: the ummah, from the time of the Messenger of Allah to this day, has held fast to prayer in congregation and disapproved of whoever neglects it; this constancy is a proof of obligation. There is here no real difference in expression, for the emphatic recommendation and the obligation produce the same effect, especially for the manifest rites of Islam. Do you not see that al-Karkhi called it a "recommendation" and then defined it as an obligation, saying: the congregation is a recommendation whose observance no one may delay without an excuse? That is the very definition of obligation with the majority.
Second opinion: an emphatic recommendation. The Malikis, some Shafi'is, and Imam Ahmad in one report hold that prayer in congregation is an emphatic recommendation (sunna mu'akkada). They cite the Prophet's hadith:
Prayer in congregation is superior to prayer offered alone by 25 degrees, or by 27 degrees.Authentic hadith, reported by al-Bukhari (619) and Muslim (650)
The mention of superiority is the hallmark of recommendations. Ibn Abd al-Barr said: the Prophet's words "prayer in congregation is superior to prayer alone" can only be understood in one of 3 ways: either it refers to supererogatory prayer, or to the one who misses the congregation with an excuse, or to the one who misses it without an excuse.
Yet it is established that the Prophet said: "A man's prayer in his house is better than his prayer in this mosque of mine, except the obligatory prayers": we therefore know that the hadith of this chapter does not refer to supererogatory prayer, since he preferred the supererogatory prayer offered alone in one's house. Likewise the Prophet said: "If someone has a night prayer and sleep overcomes him, the reward of his prayer is written for him, and his sleep is counted as charity" (authentic hadith reported by an-Nasa'i, 1784); and: "If an illness keeps a man from a deed he used to do, the reward of that deed is written for him as long as his illness lasts" (weak hadith reported by at-Tabarani in al-Awsat, 8609). We therefore know that the one who misses with an excuse does not fall under the hadith. Once these 2 readings are set aside, what remains is that the one intended is the one who, without excuse, neglects what was enjoined: this proves that the recommendation weighs upon him as an obligation, and that the Prophet only compared congregation and solitary prayer while both were lawful, one being superior to the other (al-Istidhkar, 2/138).
The upholders of this second opinion add: the Prophet did not rebuke the 2 men who said they had prayed in their camps; had the congregation been obligatory, he would have rebuked them. Aswad ibn Yazid reports that his father prayed with the Messenger of Allah as a young man, and that 2 men had not prayed in a corner of the mosque; the Prophet had them brought, and their sides were trembling:
What prevented you from praying with us? They said: we have prayed in our camps. He said: do not do that; if one of you prays in his camp and then comes upon the imam having not yet prayed, let him pray with him: it will be a supererogatory prayer for him.Authentic hadith, reported by Abu Dawud (575), at-Tirmidhi (219) and an-Nasa'i (858)
Third opinion: a collective obligation. Prayer in congregation is a collective obligation (fard kifaya): this is the view of the Shafi'is within the school, of some Malikis, and of one position of the Hanbalis transmitted by Ibn Muflih from al-Shaykh Taqi ad-Din, that is, Ibn Taymiyya (Mawahib al-Jalil, 2/81; Bulghat as-Salik, 1/279; Rawdat at-Talibin, 1/339; al-Majmu', 5/38 and 5/236; al-Mubdi', 2/42). They cite the Prophet's words:
No 3 men in a village or a nomad camp but that the prayer is not established among them without Satan gaining mastery over them; hold fast to the congregation, for the wolf devours only the straying sheep.Hasan hadith, reported by Abu Dawud (547) and an-Nasa'i (847)
The Shafi'is specify: the obligation is discharged once the banner of the congregation appears by its establishment in a place in the village, small or large, or in the city, in places where that banner is manifest. This varies with countries and their inhabitants: in a small village its establishment in one place suffices, and in the great city in several places. In the soundest view, the obligation is not removed by prayers performed in houses, even if groups pray there while the majority abstain.
The minimum that removes the collective obligation from the rest is 3 persons, or 2 according to a second position, which is the more apparent; if all of them withhold from establishing it, the imam fights them, for such is the case of collective obligations when paralyzed, and it is the imam who fights them. The obligation is not removed by a group however small: if all refused to establish it by shutting themselves in their houses, without the banner being manifest, the obligation would not be removed, and the imam, or his deputy, would fight them, not each individual man. The same applies if the inhabitants of a district in a great city or a large town abandon it (Rawdat at-Talibin, 1/339; al-Majmu', 5/38 and 5/236; Asna al-Matalib, 1/209; an-Najm al-Wahhaj, 2/325-326; al-Iqna', 1/163; Ujalat al-Muhtaj, 1/294).
As for women, the Shafi'is and the Hanbalis hold that congregational prayer is recommended for them among themselves, apart from the men, whether the imam be a man or a woman, on account of the practice of Aisha and Umm Salamah. Raytah al-Hanafiyyah reports: "Our mother Aisha led us in prayer, and she stood in our midst in the obligatory prayer" (reported by ad-Daraqutni, 1/404, and al-Bayhaqi in al-Kubra, 3/131). Hujayrah bint Husayn reports: "Umm Salamah led us in the asr prayer, and she stood in our midst" (reported by ad-Daraqutni, 1/405, and al-Bayhaqi, 3/131; an-Nawawi authenticated both chains in al-Majmu', 5/255).
The Prophet ordered Umm Waraqah to have a muezzin call the prayer for her, and to lead the people of her house in prayer.Hasan hadith, reported by Abu Dawud (592), Ahmad (9/405) and Ibn Khuzaymah (6/405)
For every prayer in which congregation is recommended for men, it is recommended for women as well, whether obligatory or supererogatory (al-Majmu', 5/254; ash-Sharh al-Kabir of ar-Rafi'i, 4/286; Kashshaf al-Qina', 1/456; Sharh Muntaha al-Iradat, 1/260; Matalib Uli an-Nuha, 1/611; Manar as-Sabil, 1/118; al-Awsat, 4/227; al-Ifsah, 1/205).
The Hanafis, for their part, hold that the women's congregation is disliked but sufficient for them: their going out to the congregations, they say, may lead to temptation (Mu'ani al-Athar, 1/488; al-Ikhtiyar, 1/59; al-Majmu', 5/244). As for the Malikis, they prohibit the women's congregation: the imam must be a male, so that a woman's imamate for men, or even for women like herself, is not valid, not even for a supererogatory prayer; it is only valid for a woman to attend the men's congregation when she does not fear temptation (Tafsir al-Qurtubi, 1/356; ash-Sharh as-Saghir, 1/156 and 160; Asah al-Madarik, 1/241; Bidayat al-Mujtahid, 1/204-205; al-Ifsah, 1/205).
Prayer in congregation is only obligatory upon sane, free men who are able to attend it without hardship. It is therefore not obligatory upon women, children, the insane and those with an excuse. Their prayer in congregation nonetheless remains valid and does constitute a congregation (Mu'ani al-Athar, 1/488; ad-Dusuqi, 1/320; Mughni al-Muhtaj, 1/229; Sharh Muntaha al-Iradat, 1/244-245).
The jurists agree that the smallest number with which the congregation is formed is 2 persons, provided they are fully bound by religious duties: the imam and a single person with him suffice to obtain the reward of the congregation. The Prophet said to Malik ibn al-Huwayrith:
When the time of prayer comes, let the 2 of you make the adhan, then the iqamah, and let the elder of you 2 lead the prayer.Reported by al-Bukhari (2693) and Muslim (674)
Two persons and more constitute a congregation.Weak hadith, reported by Ibn Majah (972), from Abu Musa al-Ash'ari
This holds in the mosque or outside it, in a house or in the desert, and whether the follower is a man or a woman: whoever leads the prayer for his wife, his daughter or any other woman obtains the reward of the congregation, that of the 25 or 27 degrees, and this by consensus. The congregation, indeed, is taken from the meaning of gathering, and the minimum by which gathering is realized is 2. The Prophet called 2 persons a "congregation" without restriction, and the meaning of gathering is realized by each of the 2 joining the imam (al-Majmu', 5/250; Fath al-Bari of Ibn Rajab, 4/52-53; Mu'ani al-Athar, 1/489; al-Mughni, 2/379-380; al-Ifsah, 1/203; Tarh at-Tathrib, 2/261).
The scholars differed, however, if the follower is a child who has attained discernment: does the congregation form with him in the obligatory prayer or not? As for the child without discernment, the congregation does not form with him by agreement. The Hanafis, the Shafi'is and Ahmad in one report hold that the congregation forms with the child and the reward is obtained: in the Shafi'i view he may validly be an imam, just as he may validly be led by an adult. That is why the Prophet asked, concerning the man who had missed the congregation: "Who will give charity to this man by praying with him?" (authentic hadith reported by Abu Dawud, 574, Ahmad in al-Musnad, 11019, and Ibn Hibban in his Sahih, 2398). The Malikis and Ahmad in the second report hold that no reward of the congregation is obtained by following a child in the obligatory prayer: since the child's prayer is supererogatory, the imam is as if he had prayed alone.
In the supererogatory prayer, however, it is valid without dispute and the reward of the congregation is obtained: the Prophet led Ibn Abbas in prayer once when he was a child, and Hudhayfah another time (ash-Sharh al-Kabir, 1/320; at-Taj wa-l-Iklil, 2/83; ash-Sharh as-Saghir, 1/280; al-Mughni, 2/379; Fath al-Bari of Ibn Rajab, 4/252).
The Malikis add a rule concerning the appointed imam: the one designated by the ruler or his deputy, by a pious endowment or by the Muslim community, to lead the prayer in a place prepared for congregational prayer, mosque or otherwise, for the 5 prayers or part of them. If, at his usual time, he finds no one and prays alone after making the adhan and the iqamah, he is counted as the congregation in merit and in ruling, provided he has the intention of imamate.
His solitary prayer, indeed, is distinguished from his prayer as imam only by the intention: that is why he does not repeat it a second time, and no one establishes the congregation in his place; the one who prayed alone joins him. He may perform a single prayer in case of rain and the like, if he has made the adhan and the iqamah and waited for the people at their usual time, and no one came (ash-Sharh al-Kabir, 1/323; ash-Sharh as-Saghir, 1/282; Minh al-Jalil, 1/356). These rules concern the number of the congregation apart from the Friday and festival prayers; for those 2 prayers the number differs from one school to another, as will be set out in the rulings of the Friday and festival prayers.
It is permitted to establish prayer in congregation in any pure place, in a house, in the desert or in the mosque, by the Prophet's words:
I have been given 5 things that no one before me was given. Among them: the earth has been made for me a mosque and a means of purification; whichever man of my community the time of prayer overtakes, let him pray.Reported by al-Bukhari (328) and Muslim (521)
Aisha reports that the Prophet, while ill, prayed in his house sitting, and that some people prayed behind him standing; he signaled to them to sit down (reported by al-Bukhari, 656). He said to 2 men who had prayed in their camps: "If you pray in your camps and then come upon a congregation, pray with them: it will be a supererogatory prayer for you" (authentic hadith reported by at-Tirmidhi, 219, and an-Nasa'i, 858).
The congregation of the obligatory prayers in the mosque is nonetheless superior to that performed outside the mosque, by the Prophet's words: "Pray, O people, in your houses: the best of prayer is a man's prayer in his house, except the obligatory prayers" (reported by al-Bukhari, 698). The mosque, indeed, combines nobility, purity, the manifestation of the rites and the abundance of the congregation. Praying in the mosques where people are many is superior to praying in those where they are few:
A man's prayer with one man is purer than his prayer alone; his prayer with 2 men is purer than his prayer with one; and the more numerous it is, the more beloved it is to Allah the Most High.Hasan hadith, reported by Abu Dawud (554) and an-Nasa'i (843)
Ibn Qudamah said: if there stands near a man, or far from him, a mosque in which the congregation forms only through his presence, praying there is preferable, for he gives life to that mosque by establishing the congregation in it and enables those who pray there to obtain that reward. If the congregation already forms there and his purpose would be to break the heart of its imam or its congregation, mending their hearts is preferable. Otherwise, should he aim for the far mosque or the near one? Two reports exist: the far one, to multiply the steps in seeking reward and thereby the good deeds; and the near one, for the neighborly tie gives him greater right to his prayer, just as the neighbor has greater right to a gift and kind treatment than the distant one (al-Mughni, 2/381).
An-Nawawi said: if there are several mosques, it is superior to go to the one with the largest congregation, according to the hadith cited; if a sparsely attended mosque is near him and a more heavily attended one far away, the distant one is preferable, except in 2 cases. First, if his departure causes the congregation of the near one to be lost, because he is its imam or because the people attend when he does: then the near one is superior. Second, if the imam of the distant one is an innovator, such as a Mu'tazili, or a wrongdoer, or does not affirm the obligation of one of the pillars: then the near one is superior. If the neighborhood mosque has no congregation, and his presence would give rise to neither congregation nor attendees, there is consensus that going to the mosque of the congregation is superior (al-Majmu', 5/252).
If he prays in congregation in his house, that is superior to praying alone in a mosque, according to the previous hadith: the virtue attached to the act of worship itself is superior to the virtue attached to its place or time. If, were he to go to the mosque, his family would pray alone, slacken, or some of them would already be at prayer, while his prayer at home would be in congregation, whereas his prayer in the mosque would be solitary, then his prayer in his house is superior (Mughni al-Muhtaj, 1/230; Asna al-Matalib, 1/210).
Ibn Qudamah says further: if the land is a frontier town, it is preferable that the people gather in a single mosque, so that the word may be raised higher, awe be greater, news of the enemy heard by all, consultation easier, and the spy of the disbelievers see their number. Al-Awza'i said: had the matter been mine, I would have ordered the doors of the frontier mosques closed, so that the people would gather in a single mosque (al-Mughni, 1/381).
Prayer in the 3 mosques, the Sacred Mosque, the Prophet's Mosque and al-Aqsa Mosque, even in small numbers, is superior to congregational prayer elsewhere, even in great numbers. Some Shafi'is even said that praying alone in these 3 mosques is superior to the congregation performed elsewhere (Mughni al-Muhtaj, 1/230).
All that precedes, concerning the superiority of the congregation in the mosque, applies to men. For women, the congregation in the houses is superior for them to the congregation in the mosque, by the Prophet's words:
A woman's prayer in her house is better than her prayer in her chamber, and her prayer in her inner room is better than her prayer in her house.Authentic hadith, reported by Abu Dawud (570) and Ibn Khuzaymah (3/95)
The majority of jurists, Hanafis, Malikis and Shafi'is, dislike the repetition of the congregation in the mosque of the neighborhood that has an appointed imam and a known community, when the mosque is not deserted: if people enter a mosque whose residents have already prayed, they pray individually. Abu Bakrah reports that the Messenger of Allah, coming for the prayer from one side of Madinah, found that the people had already prayed; he inclined toward his dwelling, gathered his family and prayed with them (hasan hadith reported by at-Tabarani in al-Awsat, 4601; al-Haythami states in al-Majma', 2/45, that it is reported by at-Tabarani in al-Kabir and al-Awsat with trustworthy narrators).
Had the repetition of the congregation in the mosque been permitted, he would not have left the prayer in the mosque, which is superior. We are moreover commanded to multiply the congregation, and its repetition in a single mosque diminishes it: if people know that the congregation will escape them, they hasten to attend, and the congregation grows; if they know it will not escape them, they delay, and the number of congregations decreases.
This ruling is detailed according to the schools. The Hanafis, for whom the dislike of repetition reaches the degree of prohibition, restrict it to the case where the residents of the neighborhood have prayed in their mosque with adhan and iqamah: if strangers have prayed there first, without adhan or iqamah, the repetition is not disliked. With Abu Yusuf, the dislike applies when the second congregation is numerous; if 3 or 4 persons stand in a corner of the mosque and pray in congregation, it is not disliked.
Ibn Abidin transmits from Abu Yusuf: if the second congregation does not have the form of the first prayer, it is not disliked; and the form changes with the abandoning of the mihrab. Muhammad reports that repetition is disliked only if the second congregation comes of a deliberate rallying and gathering (Bada'i as-Sana'i, 1/153; al-Mabsut, 1/135; Ibn Abidin, 1/552-553; Durr al-Hukkam, 1/369; al-Inaya, 15/347; Tuhfat al-Fuqaha, 1/115).
The Malikis say: the appointed imam may gather a second time, that is, form the congregation, in his mosque, if someone else, a muezzin or the like, has gathered before him without his permission; unless he delays greatly, to the point that the waiting harms the people. Likewise if permission was granted him: it is then no longer permitted for him to gather after them, the dislike applying, his right no longer to be taken into account.
When a group enters the mosque after the congregation, it is recommended for them to leave the mosque to gather outside, or with an appointed imam, or in a mosque without an appointed imam, and not to pray individually there, which would deprive them of the reward of the congregation. Except if it is one of the 3 mosques, the Sacred Mosque, the Prophet's Mosque and al-Aqsa: then they pray individually, given the superiority of solitary prayer in these mosques over congregation elsewhere, if on entering they find the imam has already prayed. If they know before entering, they gather outside and do not enter to pray alone (Hashiyat ad-Dusuqi with ash-Sharh al-Kabir, 1/332; al-Mudawwanah, 1/90; ash-Sharh as-Saghir, 2/30; al-Fawa'ih ad-Dawani, 1/212; at-Taj wa-l-Iklil, 2/113; al-Kafi, 1/51).
The Shafi'is, after establishing the dislike of repeating the congregation in the mosque that has an appointed imam, add: the one who attends and finds only people who have already prayed, it is recommended that one of them pray with him, so that he obtains the reward of the congregation, according to the hadith of Abu Sa'id al-Khudri:
A man came when the Prophet had already prayed. He said: is there a man who will give charity to this one by praying with him? A man stood up and prayed with him.Authentic hadith, reported by Abu Dawud (574), at-Tirmidhi (220) and Ahmad (3/5)
This concerns the neighborhood mosque that has an appointed imam. As for the mosque that has none, the market mosque, or those on the people's thoroughfares, there is no dislike for the second congregation, the third, and more: an-Nawawi established this by consensus (al-Majmu', 5/286; see al-Umm, 1/136).
The Hanbalis, for their part, do not dislike the repetition of the congregation in a single mosque, even if it is the neighborhood mosque with an appointed imam. On the contrary, they say that if the neighborhood imam has prayed and another group arrives, it is recommended for them to pray in congregation, by the general sense of the hadith: "prayer in congregation is superior to prayer alone by 25 degrees" (reported by al-Bukhari, 619, and Muslim, 650). For the 3 mosques, however, the repetition of the congregation there is disliked according to Ahmad, lest people slacken in attending the congregation with the appointed imam when it is possible for them to pray in congregation with him.
Ibn Qudamah says: the apparent sense of the reports of Abu Sa'id and Abu Umamah, that is, the previous hadith, indicates that it is not disliked there, for it manifestly took place in the Prophet's Mosque; and the meaning requires it as well, since the reward of the congregation is obtained there as elsewhere (al-Mughni, 2/382; Fath al-Bari of Ibn Rajab, 4/24 and 26; Kashshaf al-Qina', 1/457; Matalib Uli an-Nuha, 1/617).
The jurists hold that if the mosque has an appointed imam who has established the prayer, it is not permitted for another imam to establish with him and pray with others at the same moment. Al-Hattab transmits from Abu al-Qasim ibn Abd ar-Rahman ibn al-Husayn ibn Abdallah ibn al-Habbab: as for the case where 2 congregations or more are found in a single mosque, then the prayer is established, and the appointed imam steps forward and prays, while the others sit waiting without any necessity, forgoing the establishment of the prayer with the appointed imam, occupied with supererogatory prayers and conversation until his prayer ends, then the next one stands and the second congregation does the same before praying.
Or again: a single prayer arrives, such as maghrib, and each imam establishes the prayer aloud so that all hear it, the 2 imams facing one another, their followers mingled in the rows, each hearing the recitation of the other, one bowing while the other rises, and the third prostrating. The community is unanimous that such a prayer is not valid; at the very least it is objectionable.
He says elsewhere: as for establishing a single prayer with 2 appointed imams, one of the 2 steps forward, being the one appointed to pray first, while the other congregation and its imam sit waiting until the first has finished, then they establish their prayer. No one has held this, nor can anyone relate such a word from any jurist, in deed or in word. What then of 2 imams establishing the prayer at the same moment, each saying "Come to prayer", each pronouncing the takbir, the worshippers mingled and each hearing the recitation of the other? They have added to the disagreement of the community's earlier and later generations, and contradicted the Messenger of Allah's words: "Let none of you surpass another in the recitation of the Quran" (authentic hadith reported by Malik in al-Muwatta, 177, Ahmad in al-Musnad, 2/36 and 67, and an-Nasa'i in al-Kubra, 3360 and 8091).
The Messenger of Allah would not accept this from one praying an individual supererogatory prayer in the mosque, nor from a follower praying behind an imam: how would he accept it from 2 solitary imams? It has no known precedent, ancient or recent. He says further: as for establishing the maghrib and isha prayers of the month of Ramadan at the same moment, no scholar approved of it; all who were asked about it condemned it, and some denounced it unprompted. The imam's permission does not make it licit, as if the imam were to permit the sale of wine or drinking it, or leading a prayer without the Fatiha, or marriage without a guardian.
He mentions that al-Shaykh Abu Bakr at-Tartushi and al-Shaykh Yahya az-Zanati denounced this prayer and never prayed a single rak'ah behind the imam of the Malikis in the Sacred Mosque. The imam of the Malikis at that time was above reproach: Razzin in the days of az-Zanati, and al-Qabsi in the days of at-Tartushi. He reports that scholars of the Malikis and Hanafis, who returned to Makkah in the year 551, denounced the prayer of the 4 imams following one another in the well-known form; what was expounded to them of the prohibition of this prayer was accepted by them, and he denounced before them its establishment: forbidding it is the madhhab of Malik, al-Shafi'i and Abu Hanifah.
Al-Shaykh Abu Ali al-Ghassani said: if the community splits at the iqamah among multiple imams, one prostrating, one bowing, one saying: Allah hears the one who praises Him; no such imam was ever mentioned, nor permitted by anyone after the Prophet, whether his creed was sound or corrupt, traveling or resident, nor even at the height of battle and the press of the ranks for the cause of Allah. There exists no precedent of this to be imitated.
The judge Jamal ad-Din Ibn Zuhayrah was asked about the 4 imams establishing the maghrib prayer together at one moment; the questioner noted that this never occurred in the time of prophethood, nor of the rightly guided caliphs, nor in the time of the 4 imams. He answered: the maghrib prayer of the 4 imams all at once is among the gravest innovations, among the most hideous things that the scholars, early and late, have denounced, rejecting them from their inventors, whether newcomers or residents.
He cites the words of Ibn al-Habbab and al-Ghassani, then says: these 2 men suffice us in this question, and what the first transmits of the consensus of the community and the words of the imams is sufficient. He reports that a scholar told him he was present, during the pilgrimage of the year 792 in the Sacred Mosque, with al-Shaykh al-Imam al-Allamah Abu Abdallah Ibn Arafah, the scholar of the Maghrib of his time, unanimously recognized for his knowledge, religion and excellence; seeing the gathering of the 4 imams for the maghrib, he denounced it and said: this is not licit by the consensus of the Muslims; I know of no disagreement among them. Al-Hattab finally reports from his father, when asked about 2 imams with 2 congregations in a single prayer and a single time in one mosque: that is not permitted (Mawahib al-Jalil, 2/109 and 112).
The book Kifayat at-Talib ar-Rabbani specifies: the prayer is disliked out of courtesy in any mosque that has an appointed imam to gather the prayer twice in it, before the appointed imam, with him, or after him, for that leads to hatred and quarrels between imams. Al-Adawi says in his gloss: the words "or with him" are weak, according to what al-Shaykh Ali ibn Muhammad al-Jawhari reported: the madhhab is that it is forbidden for anyone to pray while the appointed imam prays, alone or in congregation. Ad-Dusuqi said: if one of them establishes the prayer while the other is praying, there is no dispute over its prohibition (Hashiyat al-Adawi, 1/388; ath-Thamar ad-Dani, 1/157; Hashiyat ad-Dusuqi, 1/332; Bulghat as-Salik, 1/291).
What these scholars established, namely the impermissibility of 2 congregations at the same time in one mosque, applies when the mosque has an appointed imam, or when the 2 congregations are deliberate and each knows of the other. Otherwise, if the 2 congregations form in a mosque without an appointed imam, or are not deliberate, or the mosque is deserted, the scholars have views. Al-Hattab said: if 2 congregations pray with 2 imams in one mosque, they have acted badly, but their prayer is valid; he said it in at-Tawdih (Mawahib al-Jalil, 2/112).
Al-Hattab also transmits from al-Burzuli, in his questions on prayer: 2 congregations praying at the same time with 2 imams close to one another, each followed by a group, each group doubts whether to follow its imam or the other in what it hears of the takbir and the rest; this is not permitted. The prayer of the one who doubts whether he followed his imam or the other is invalid, even if he is certain he followed his own, because his attention is seized by this undue burden. It is best that one of the 2 pray before the other if there is room in the time; otherwise, as with maghrib, let them join a single imam and go to the great mosque: do not engage yourself in what you doubt. Al-Hattab specifies: this applies apart from the mosque that has an appointed imam (Mawahib al-Jalil, 2/113).
As for the Shafi'is, ash-Shihab ad-Din ar-Ramli was asked: is it disliked to establish 2 congregations at one moment in a deserted mosque that has an appointed imam, without his permission or not? He answered: it is not disliked; and all the more so, by analogy, since the dislike of establishing a single congregation before its imam there is negated. The precise formulation: if the mosque has an appointed imam and is not deserted, it is disliked for anyone other than its imam to establish the congregation in it, except after the imam has finished. According to another formulation, it is disliked to establish a congregation in a mosque without its imam's permission, unless it is deserted; and according to Jami al-Mukhtasarat, the congregation with an appointed, frequented holder is disliked, even after him, in the soundest view. The explicit dislike of 2 simultaneous congregations therefore applies outside the deserted mosque: most of the authors explicitly stated the dislike of the prayer performed before or after the imam, but were silent about simultaneity (Fatawa ar-Ramli, 2/96; Nihayat al-Muhtaj, 2/141; Hashiyat al-Jamal, 1/505).
Ibn Uthaymin was asked about the one who establishes a second congregation in the mosque knowing that the first has not finished its prayer: is their prayer counted invalid? He answered: when you arrive and the imam is in the final tashahhud with a congregation, it is better not to begin the prayer before the first congregation finishes, so that 2 congregations do not form at once. If they did so, at a distance from the first congregation, without disturbing them, there is no harm in it. If both groups are each a second congregation, not deliberate, surprised to find another congregation in the mosque, each congregation must complete its prayer, and no imam should cut it off, even if he is certain the other congregation came first, by the word of Allah: "And do not render your deeds void" (Surah Muhammad, 33).
There is no clear text forbidding 2 congregations at one moment in this form; rather what indicates the contrary is transmitted: Aisha reports that the people prayed by night in Ramadan in the mosque of the Messenger of Allah scattered in small groups: a man would recite a portion of the Quran, and 5 or 6 persons, or fewer or more, would pray according to his prayer (reported by Ahmad in al-Musnad, 6/267, with his wording, and Abu Dawud, 1374; authenticated by al-Albani in Salat at-Tarawih, 1/11). Al-Bukhari (1906) reports from Abd ar-Rahman ibn Abd al-Qari that he went out one night of Ramadan with Umar ibn al-Khattab to the mosque, and they found the people scattered, each praying alone or followed by a small group. These 2 proofs indicate that more than one congregation may coexist in a single mosque; nonetheless, a second congregation must not be deliberately created when a congregation already exists, for that divides the rows.