Islamic Fiqh > Prayer > Group prayer and the rules of the imam > The woman in the row of men: is the prayer of the one aligned with her annulled?
Contents
Updated on 25 September 2026 at 3:23 PM
This part belongs to the full section: All sections of this part.
Standing behind the rows of men is for the woman a commanded sunnah; if she stands in the row of men, that is disliked. But does it annul the prayer of the one standing at her level? The scholars hold 2 opinions.
First opinion. This is the madhhab of the Hanafis, as well as that of Abu Bakr and Abu Hafs among the companions of Ahmad: if a woman stands in the row of men, her prayer is not corrupted, but she corrupts the prayer of the man on her right, of the man on her left, of the man behind her and of the man beside her. The Hanafis specify: if 2 women stand in the row of men with other rows behind them, they corrupt the prayer of a man on their right, of a man on their left and of 2 men behind them. If they are 3, the doctors differ: for some, they corrupt the prayer of 3 men behind them, and no more; for others, they corrupt the prayer of all the men behind them, for 3 women constitute a full row in themselves (al-Mubdi', 2/84; Tuhfat al-Fuqaha, 1/228; al-Mabsut, 1/192; al-Hidayah, 4/267; al-Ikhtiyar, 3/44; al-Bahr ar-Ra'iq, 1/379; Ibn Abidin, 2/187; Hashiyat al-Adawi, 1/476; Bulghat as-Salik, 1/291; at-Taj wa-l-Iklil, 2/236; al-Muhadhdhab, 1/100; al-Majmu', 5/387-388; al-Mughni, 2/419; Majmu al-Fatawa, 23/395-396; at-Tanqih, 2/12; Kashshaf al-Qina', 1/488).
Second opinion. The Malikis, the Shafi'is and the Hanbalis within the school hold that the woman who stands in the row of men corrupts neither her prayer, nor that of the one aligned with her, nor that of the one behind her: were she to stand there outside the prayer she would not annul it, and the same applies during the prayer. It is moreover established that Aisha "used to pass in front of the Prophet while he prayed, when he was prostrating" (authentic hadith, already cited). Ahmad has a report according to which she corrupts the prayer of the one aligned with her: Ibn Muflih reports that Ibn Aqil mentioned a report to that effect, and that the book al-Fusul judges that position the more probable, Ahmad himself having abstained from ruling; al-Shaykh Taqi ad-Din, that is, Ibn Taymiyyah, says it is the explicit text; and it is also said: the one behind her.
Al-Mudawwanah al-Kubrah reports: Ibn al-Qasim was asked: if a woman prays in the midst of the rows, between the men, does that corrupt the prayer of a man in the view of Malik? He said: I do not consider that it corrupts the prayer of a man, nor her own. He was also asked about people who came to the mosque and found the space of the mosque filled with women, while the men, the mosque being full, prayed behind the women according to the prayer of the imam: he said: their prayer is complete and they do not repeat it. Ibn al-Qasim said: that is graver still than the case of the one who prays amid the women (al-Mudawwanah al-Kubrah, 1/106).
The principle in congregational prayer is that those following the imam form aligned rows. The scholars differed, however, if someone prays alone behind the row: is his prayer valid? The majority of jurists, Hanafis, Malikis and Shafi'is, hold the validity of his prayer, with dislike, according to the account of Abu Bakrah: he came upon the Prophet while he was bowing, and bowed before reaching the row; he informed the Prophet of it, who said: "May Allah increase you in zeal; do not repeat" (reported by al-Bukhari, 750).
The Prophet thus validated his following behind the row and did not order him to repeat: if bowing behind the row is permitted, the rest of his prayer is as well, for bowing is a pillar. And if it becomes clear that his neighbor is in a state of major ritual impurity, his prayer is valid by consensus, even though he is solitary behind the row. The hadiths ordering repetition are, if authentic, interpreted as recommendation, in order to reconcile the proofs.
Ibn Abd al-Barr said: the view of the majority of jurists, Malik, al-Shafi'i, ath-Thawri and Abu Hanifah, and of those who follow them, is to permit the prayer of the solitary worshipper behind the row; the hadith of Wabsah has a shaky chain that many hadith scholars do not accept (at-Tamhid, 1/269). Al-Kasani says: the isolation of the follower behind the imam from the row does not prevent the validity of the following according to the majority of scholars.
The hadith scholars, among them Ahmad ibn Hanbal, hold on the contrary that it does prevent it, relying on the hadith: "There is no prayer for the solitary worshipper behind the row", and on the account of Wabsah that the Prophet saw a man praying in a corner of the ground and said: "Repeat your prayer: there is no prayer for the solitary worshipper behind the row". The defenders of validity answer: Anas reports that the Prophet placed behind himself the orphan and Anas, and Anas's mother, Umm Sulaym, behind them; he thus validated their following despite his isolation behind the rows, and the hadith shows that the alignment of a woman corrupts the prayer of the man, since the Prophet placed her behind them despite his prohibition of isolation: he acted thus to preserve their prayers.
Abu Bakrah, indeed, entered the mosque while the Messenger of Allah was bowing; he pronounced the takbir and edged forward on the ground until he joined the rows; when the Prophet finished his prayer, he said: "May Allah increase you in zeal; do not repeat", or: "Do not repeat". The Prophet thus validated his following behind the row, and the proof is that if it becomes clear that his neighbor is in a state of major ritual impurity, his prayer is valid by consensus, even though he is solitary behind the row. The hadith is therefore interpreted as a negation of completeness, and the command to repeat is an aberrant narration.
And even were it established, it could be understood that there was between that man and the imam something preventing the following, the hadith saying "in a corner of the ground", that is, a side. The soundest view, with the hadith scholars themselves, is that he join the row if he finds a gap, then pronounce the takbir, isolation without necessity being disliked; the reason for this dislike is set out in the chapter on disliked acts in the prayer. If the man isolates himself and then walks to join the row, it is related in the fatwas of Muhammad ibn Salamah: if he walks in his prayer the distance of a single row, his prayer is not corrupted; if he walks more, it is corrupted.
Likewise the one who lagged behind, when he rises to make up what he missed and steps forward so as not to pass in front of the people: if he walks the distance of a row, his prayer is not corrupted; more, it is corrupted. This is the choice of the jurist Abu al-Layth, in the mosque as in the desert; if he walks the distance of a row and stops, his prayer is not corrupted. Some measure it by the place of his prostration, others by the distance of 2 rows; beyond that, his prayer is corrupted (Bada'i as-Sana'i, 1/146; Mu'ani al-Athar, 1/458-459; Sharh Fath al-Qadir, 1/357; Ibn Abidin, 1/570; al-Istidhkar, 2/271, 316-317; Bidayat al-Mujtahid, 1/210; Sharh Ibn Battal, 2/400; at-Taj wa-l-Iklil, 2/131; al-Majmu', 5/389; Mughni al-Muhtaj, 1/247).
The Hanbalis, for their part, hold that the prayer of the one who prayed a complete rak'ah alone behind the row is not valid, according to the account of Wabsah ibn Ma'bad:
The Messenger of Allah saw a man praying alone behind the row and ordered him to repeat.Authentic hadith, reported by Abu Dawud (682), at-Tirmidhi (230) and Ibn Majah (1004)
Ali ibn Shiblan reports: we set out until we came to the Prophet, pledged him allegiance and prayed behind him; then he prayed another prayer, and when he had finished it, he saw a man praying alone behind the row; the Prophet stopped at him as he was leaving and said: "Repeat your prayer: there is no prayer for the one behind the row" (authentic hadith reported by Ibn Majah, 1003, Ibn Khuzaymah, 3/30, and Ibn Hibban, 5/579). That man's prayer is not valid because he contradicted the standing of the rows, like the one who prays in front of the imam. As for the account of Abu Bakrah, the Prophet said to him: "Do not repeat"; and the prohibition implies invalidity; his excuse in what he did was his ignorance of the prohibition, and ignorance opens the way to pardon (al-Mughni, 2/425; Kashshaf al-Qina', 1/490; al-Mubdi', 2/87; Nayl al-Awtar, 2/242).
Shaykh al-Islam Ibn Taymiyyah was asked about the one who prays alone behind the row: is his prayer valid, and are the hadiths reported on this authentic? He answered: praise be to Allah; the correct position among the sayings of the scholars is that the prayer of the solitary worshipper behind the row is not valid: there are 2 hadiths of the Prophet in which he ordered the one praying behind the row to repeat, and said: "There is no prayer for the solitary worshipper behind the row". More than one imam of hadith authenticated these 2 reports, their chains are of the kind upon which argument is built, and those who contradict them rely in many questions on chains weaker than they; nothing in them contradicts the established principles; on the contrary, they are what the famous texts and the recognized rules require.
Congregational prayer, indeed, is named congregation for the worshippers' joining in the act, the place and the time; if they violate the joining of place or time, by preceding the imam or withdrawing far from him without excuse, that is forbidden by the consensus of the imams. Likewise if they are scattered and disordered, one behind another in disarray: that is among the most censured of things. The Muslims were commanded to align; the Prophet ordered them to straighten and adjust the rows, to close the gaps, fill the voids and fill the first row first: all that is an extreme care to realize their joining in the best way.
Were alignment not obligatory, one man behind a single other would be permissible without limit, and everyone knows, as common knowledge, that this is not the prayer of the Muslims. Likewise, were the rows disordered, one preceding another, that is part of what the Prophet's prohibition of is well known, and the prohibition implies forbiddance. Those who oppose this cite the validity of the solitary woman's prayer, according to the authentic account in which Anas and the orphan stood behind the Prophet and the old woman behind them: the scholars agree on the validity of the woman standing alone when there is no other woman in the congregation, as the sunnah established; they also cite the imam standing alone, and the account of Abu Bakrah who bowed before the row and then entered it, and to whom the Prophet said: "May Allah increase you in zeal; do not repeat". But this is a weak proof that does not withstand the proof of the prohibition, for 2 reasons.
The first: the woman's standing behind the row of men is a commanded sunnah; were she to stand in the row of men, that would be disliked: how then to analogize the prohibited to the commanded? Likewise, the imam's standing in front of the row is the sunnah: how to analogize the commanded to the prohibited? The sound analogy is that of the case the text is silent on to the explicit case; as for analogizing an explicit text to a contrary text, it is void by the consensus of the scholars, like the analogy of riba to sale, whereas Allah has made sale lawful and forbidden riba.
The second: the woman stood behind the row because she had no woman to align with and could not align with the men; had another woman prayed with her, it would have been due to her to stand with her, and she would then have the status of the man who finds nowhere to stand but behind the row. That, however, is disputed among those who annul the solitary worshipper's prayer, and the more apparent is the validity of her prayer in that case, for all the obligations of the prayer fall away through inability. The same reasoning establishes the validity of the prayer of the one who precedes the imam out of necessity, a view within one strand of Ahmad's madhhab. If standing, recitation, completing the bowing and prostration, purification with water and the rest fall away through inability, so too do alignment and refraining from preceding; and likewise for the one who prays without seeing the imam nor the one behind him, while hearing the takbir: the imam is placed in front so that the followers may see him and follow him, which is absent in the follower.
As for the account of Abu Bakrah, it does not state that he prayed alone behind the row before the imam raised his head from bowing: he attained of the commanded alignment what made him one who caught the rak'ah. He is like the one who stands alone, then another comes and aligns with him in the standing: that is licit by the consensus of the imams. His account moreover contains the prohibition "do not repeat", without an order to repeat the rak'ah, unlike the account of the solitary worshipper, in which the Prophet ordered the prayer repeated; and even were it understood that he entered the row after the imam's stillness, as is possible according to one of the 2 positions in Ahmad's madhhab and others, it would remain licit in that, without an order of repetition.
As for the distinction between the scholar and the ignorant, which is a view within Ahmad's madhhab, it is not admissible: the solitary worshipper did not know the prohibition, and the Prophet ordered him to repeat, just as he ordered the Bedouin at fault in his prayer to repeat (Majmu al-Fatawa, 23/393 and following).
The excuses that exempt from attending prayer in congregation are of 2 kinds: some are general, others particular. Here are the general excuses.
The proof that these excuses exempt from the congregation is the account of Nafi', from Ibn Umar: he had the prayer called on a night of cold, wind and rain, and concluded his call with: "Know that you may pray in your camps"; then he said: the Messenger of Allah used to order the muezzin, on a cold night or a rainy one while traveling, to say: "Pray in your camps" (reported by al-Bukhari, 606, and Muslim, 697). Jabir reports: we set out on a journey with the Messenger of Allah and it rained; he said: "Let whoever wishes among you pray in his camp" (reported by Muslim, 698).
Abdallah ibn al-Harith reports that Abdallah ibn Abbas said to his muezzin on a rainy day: when you have said "I bear witness that there is no god but Allah, I bear witness that Muhammad is the Messenger of Allah", do not say "come to prayer", but say: "Pray in your houses". The people seemed astonished by that; he said: are you astonished by this? One better than I did it. The Friday prayer is an obligation; I disliked imposing on you to walk in the mud and mire.Reported by Muslim (699)
The particular excuses relate to a person's situation. The jurists counted 9: illness, fear, the presence of food, withholding one of the 2 impurities, an offensive odor, blindness, preparing for travel, the victory of sleep, and the wedding night of a wife.
Illness that makes reaching the mosque for congregational prayer difficult: Ibn Qudamah says this is the view of most people of knowledge. Ibn al-Mundhir says: I know of no disagreement among the scholars that the sick person may neglect the congregational prayers on account of his illness; the Prophet, when ill, neglected the mosque and said: "Order Abu Bakr to pray with the people" (reported by al-Bukhari, 664, and Muslim, 313). An-Nawawi reports from his companions: among the excuses for neglecting the congregation is an illness making the journey burdensome, even if still possible, for it involves harm and hardship: Allah said: "He has not placed upon you in the religion any hardship" (Surah al-Hajj, 78). A light illness that does not make the journey burdensome, such as a toothache, a light headache or a mild fever, is not an excuse; they fixed the measure: that the person suffer hardship comparable to walking in the rain (al-Majmu', 5/261).
Fear, of 3 kinds: fear for oneself, for one's property, and for one's family. Fear for oneself: fearing an authority that will seize him, an enemy, a thief, a wild beast, an animal, a flood or the like; likewise the fear of a creditor who hounds him while he has nothing to pay him: if he imprisons him, he is an oppressed insolvent debtor; if he is able to pay his debt, it is no excuse. Fear for one's property: fearing a tyrant or a thief, that his house be robbed or burned, wholly or in part, that bread be in the oven or food on the fire and the house catch fire while he is diverted, that a creditor from whom he must not part take his property, or that merchandise or a deposit with someone be lost if he does not reach him: this and its like is an excuse for neglecting the Friday prayer and the congregational prayers. Fear for one's children and family: fearing they will be lost, that his child go missing and he hope to find him then, or that a kinsman die while he is busy elsewhere, without him witnessing his death; likewise caring for a sick stranger, with no one else to care for him, whose loss is feared if he is neglected. Ibn Qudamah reports from Ibn al-Mundhir that it is established that Ibn Umar called upon Sa'id ibn Zayd for help after the forenoon had risen; he came to al-Aqiq and missed the Friday prayer (reported by Abd ar-Razzaq in his Musannaf, 3/240, and Ibn al-Mundhir in al-Awsat, 4/23): this is the view of Ata, al-Hasan, al-Awza'i and al-Shafi'i (al-Mughni, 2/184; al-Majmu', 5/262; Sharh az-Zurqani, 2/66; Hashiyat at-Tahtawi, 1/200).
The presence of food. Ibn Qudamah says: if dinner is served at the time of prayer, it is recommended to begin with dinner before the prayer, so that his heart be free and his body ready; it is not recommended to hasten from his dinner or lunch, since Anas reports from the Prophet:
When dinner is served and the prayer arrives, begin with dinner before you pray maghrib, and do not hasten from your dinners.Reported by al-Bukhari (641) and Muslim (557)
There is no prayer when food is present, nor when one is withholding the 2 impurities.Reported by al-Bukhari (641) and Muslim (560), from Aisha
There is no difference between fearing to miss the congregation and not fearing it; one version of Anas's hadith says: "When dinner arrives and the prayer is established, begin with dinner"; and Ibn Umar dined while hearing the imam's recitation. Ibn Umar also reports that the Messenger of Allah said: "When the dinner of one of you is served and the prayer is established, let him begin with dinner and not hasten until he has finished it" (reported by al-Bukhari, 642, and Muslim, 559); "the prayer is established" means the congregation. Ahmad's companions specify: dinner only takes precedence over the congregation if the soul strongly craves it; al-Shafi'i said the like; Malik said: let them begin with the prayer, unless the food is light. Umar, his son, Ishaq and Ibn al-Mundhir followed the apparent sense of the hadith; Ibn Abbas said: "we do not rise to prayer while something holds us". Ibn Abd al-Barr reports that they agreed that if one prays despite the presence of food and completes his prayer, it suffices. An-Nawawi adds: the presence of a craved drink, water or other, is like that of food (al-Majmu', 5/261).
Withholding one of the 2 impurities. An-Nawawi says: these 2 causes remove the congregation by agreement, as does whatever carries their meaning; withholding wind is like withholding urine or stool (reported by Muslim, 560).
An offensive odor. Whoever has eaten garlic, onion, radish or the like, when its odor cannot be removed, has in that an excuse exempting from the congregation, so as not to harm the people and the angels, according to the hadith:
Whoever has eaten of this plant, garlic; and he said another time: whoever has eaten onion, garlic or leek, let him not approach our mosque: the angels are harmed by what harms the sons of Adam.Reported by Muslim (564)
This applies to these plants in their raw state. Likewise the one whose trade carries a harmful odor, such as the butcher or the oil seller, the maker of wicker, and anyone with a foul smell; and likewise the one with a disease that harms people, such as leprosy or scabies: in all these cases neglecting the congregation is permitted (Hashiyat ad-Dusuqi, 1/390; Mughni al-Muhtaj, 1/236; Kashshaf al-Qina', 1/498; Hashiyat at-Tahtawi, 1/200).
Blindness. The majority of jurists, contrary to Abu Hanifah, hold that the blind man who finds a guide has no excuse to neglect the congregation; if he finds no guide and cannot find the way himself, that is an excuse exempting him. Al-Kasani said: as for the blind man, they agree that if he finds no guide, the congregation is not obligatory upon him; if he finds one, it is not obligatory according to Abu Hanifah, but it is according to Abu Yusuf and Muhammad (Bada'i as-Sana'i, 1/489; Hashiyat at-Tahtawi, 1/200; Mughni al-Muhtaj, 1/237; Hashiyat ad-Dusuqi, 1/391; Kashshaf al-Qina', 1/497).
Preparing for travel. Whoever prepares for a lawful journey with a caravan, and the congregation is established while he fears that attending would make him miss the caravan: it is permitted for him to neglect the congregation (Ibn Abidin, 1/374; Hashiyat at-Tahtawi, 1/201; Mughni al-Muhtaj, 1/236; al-Mubdi', 2/168; al-Insaf, 2/303; Kashshaf al-Qina', 1/606).
The victory of sleep. Whoever is overcome by drowsiness and sleep fears falling asleep while waiting for the congregational prayer: the jurists count this among the excuses; likewise, if sleep overcomes him behind the imam, he may pray alone. Al-Bukhari (5755) and Muslim (465) report that a man prayed with Mu'adh: seeing that he lengthened the prayer, he withdrew and prayed alone, and the Prophet did not blame him. Al-Bahuti says: patience and endurance in repelling sleep and praying in congregation remain superior, because of the reward of the congregation (al-Mughni, 2/184; Kashshaf al-Qina', 1/496; Mughni al-Muhtaj, 1/236).
The wedding night of a wife. The Shafi'is and the Hanbalis hold that the wedding night is an excuse exempting the husband from the congregation, but the Shafi'is restrict it to neglecting the night prayers only. Shaykh al-Islam Zakariyya al-Ansari says: on account of the right of the wedding, he does not neglect going out to the congregations nor the other good deeds, such as visiting the sick and attending funerals, for the duration of the wedding, except at night: then he neglects them obligatorily, giving priority to the obligation. Al-Adhra'i says: that is an aberrant position of some Iraqis; the texts of al-Shafi'i and the words of al-Qadi and al-Baghawi establish that night is like day in the recommendation of going out for that: al-Juwayni in his Tabsirah and al-Ghazali in his Khulasah stated it explicitly. The prevailing custom, however, is to add continuous nights to the days of sharing, and that must be taken into account. The nights of sharing, in turn, require fairness between the wives, in going out or not: let him go out on the night of all of them, or not go out at all; if he reserves to some wives the night of going out, he sins (Asna al-Matalib, 3/234; al-Bayan, 9/521; Mughni al-Muhtaj, 1/236 and 4/421; al-Iqna', 2/432; Kashshaf al-Qina', 1/497).
The Malikis' view on the wedding night. They do not count marriage as an excuse: neither marriage nor settling with a wife exempts from the Friday prayer nor the 5 prayers; the bride does not neglect the Friday prayer nor the 5 prayers in congregation, for the wife has no right to keep her husband at her side to the point of exempting his absence from the Friday prayer and the congregation: her presence involves neither hardship nor harm to her, and there is no ground for neglect. Imam Malik nonetheless lightened for the husband the neglect of some congregational prayers, occupied with his wife and with the effort to comfort and appease her: he said: "I do not approve of the groom neglecting the entire prayer", meaning the congregation; it was lightened for him to neglect some of them to attend to his wife and hasten to console and appease her; that apart from the Friday prayer, whose attendance is an obligation (al-Bayan wa-t-Tahsil, 1/357; at-Taj wa-l-Iklil, 2/184; ash-Sharh as-Saghir, 2/92; Hashiyat ad-Dusuqi, 1/391; Tathbir al-Mukhtasar, 1/524).
Ibn Battal reports that Ibn Habib said: he goes out for his needs and his prayers, whether he has married a virgin or a previously married woman, whether or not he has another wife. Ibn Abi Uways reports from Malik, concerning one who is with his wife on the Friday night: does he neglect the Friday prayer? He said: no; the Commander of the Believers al-Mahdi married in Madinah, and he went out for the dawn prayer and others. Ibn al-Qasim reports from Malik, in the school of al-Utbiyyah: the groom does not neglect the Friday prayer nor attending the prayers; that is the view of al-Shafi'i. Sahnun said: some have said he does not go out, and that is her right by the sunnah: this is the view of the one who understands his staying with his wife, virgin or not, as bearing upon the right due her of share and night, which does not prevent him from attending the prayers, just as other husbands apportion among their wives; he has no right to neglect the congregation.
Al-Hattab reports that Ibn Farhun said: they differed: does he go out for prayer and for his needs? The Friday prayer, in any case, is obligatory upon him. Al-Lakhmi chose that he goes out neither for prayer nor for his needs, and Ibn Arafah transmitted it from al-Lakhmi from Ibn Habib: he goes out to attend to his needs and to the mosque; the custom today is that he does not go out, neither for prayer, even if he is alone with her, and the woman is firmly entitled to his staying; I prefer that the custom be followed. That statement is apparent, and the apparent sense of the compiler's words, "whether or not he has another wife", is al-Lakhmi's choice (Sharh Sahih al-Bukhari of Ibn Battal, 7/338; Mawahib al-Jalil, 5/221; Hashiyat ad-Dusuqi, 3/206).
The jurists set conditions for the validity of imamate. The first is Islam: they agree that the imam must be a Muslim, and that prayer behind the disbeliever who displays his disbelief is not valid (Radd al-Muhtar, 1/550; Mu'ani al-Athar, 4908; adh-Dhakhirah, 2/237; Bulghat as-Salik, 1/285; Mughni al-Muhtaj, 1/241; al-Mughni, 2/413; al-Majmu', 5/331).
On the imamate of the wrongdoer (fasiq) they differed. Abu Hanifah, the Malikis according to their soundest view, al-Shafi'i and Ahmad in one report hold the validity of the wrongdoer's imamate with dislike. They cite the hadith: "Pray behind the one who says: there is no god but Allah" (reported by ad-Daraqutni, 2/56; all its chains are very weak: Uthman ibn Abd ar-Rahman az-Zuhri al-Waqqahi is a discarded narrator in it, Nasr ibn al-Harith as-Samit is weak in it according to ad-Daraqutni, and al-Albani said in al-Irwa', 2/305, that all its routes are very weak); for he is a man whose prayer is valid, so that following him is valid like following any other; and the hadith: "Pray behind every righteous and every wicked man" (weak hadith reported by Abu Dawud, 2533, ad-Daraqutni, 2/57, and al-Bayhaqi in al-Kubra, 4/19). Ibn Umar and others prayed behind al-Hajjaj ibn Yusuf, the most wicked of the people of his time, to the point that Umar ibn Abd al-Aziz used to say: were every community to come with its worst, and we brought Abu Muhammad, they would prevail; Abu Muhammad is the kunyah of al-Hajjaj.
The Malikis specify: this applies to the wrongdoer of a carnal act, a fornicator or a drinker, by the general sense of the hadith: "They pray for you: if they do well it is for you; if they err it is for you and against them" (reported by al-Bukhari, 294). Ubaydallah ibn Adi ibn Khiyar entered upon Uthman ibn Affan while he was besieged and said: you are the imam of the people, and what has befallen you we see, while the imam of the fitnah prays for us and we feel shame. Uthman said: "Prayer is the best of deeds: if the people do well, do well with them; if they do ill, avoid their ill" (reported by al-Bukhari, 695). The retained position is the validity of prayer behind him with dislike, so long as his wrongdoing does not touch the prayer; if it does touch it, the prayer is null, as when he aims at pride through the imamate, or deliberately violates a pillar, a condition or a recommendation (Bulghat as-Salik, 1/289; Minh al-Jalil, 1/359).
Al-Kharashi said, concerning the phrase "or a wrongdoer of a carnal act": the apparent view of the earlier Shafi'is is that the prayer of whoever follows a wrongdoer of a carnal act is null, whether his wrongdoing is a major sin not entailing disbelief or a minor one; but Ibn Bazzazah, the glossator, restricted the nullity to the case of major sin, whether it touches the prayer, such as neglecting the prayer or its conditions, or not, such as fornication, backbiting, disobedience to parents, or serving a tyrant. The retained position remains the validity of prayer behind the wrongdoer of a carnal act, as established with Ibn Ghazi and others, as required by the validity of prayer behind the innovator, of whom some credible scholars said he was a disbeliever, though against the soundest view, whereas no credible opinion ever held the disbelief of the wrongdoer of a carnal act, except for the one who abandons prayer according to Ahmad and his followers. Following the wrongdoer of a carnal act remains disliked so long as his wrongdoing does not touch the prayer, such as drinking wine; if it touches it, such as aiming at pride through his elevation, one abstains from following him and the prayer is not valid (Sharh Mukhtasar Khalil, 2/22-23; Uyun al-Masa'il, 1/138; at-Tabsirah, 1/321; al-Ishraf, 1/372).
Ahmad, according to the more famous of the 2 transmissions, holds that the wrongdoer's imamate is not valid. It is said in ash-Sharh al-Kabir: the wrongdoer is of 2 kinds: wrongdoer in creed and wrongdoer in deeds. As for the wrongdoer in creed who displays his innovation, speaks of it and calls to it: his imamate is not valid, and repetition is required of the one who prayed behind him. Ahmad said: one does not pray behind an adherent of passions when he calls to his passions; and: one does not pray behind a calling Murji'ite; the Qadi added: likewise if he is a man of proof who holds them by argument, such as the Mu'tazilah, the Qadarites and the extremist Rafidites, for they become disbelievers through their innovation.
If he does not display his innovation, repetition behind him is the object of 2 transmissions. According to one, repetition is obligatory, as for the one who displays his innovation, for the hidden disbeliever is like the manifest disbeliever, and likewise the innovator; Ahmad said, according to Abu al-Harith: one does not pray behind a Murji'ite, a Rafidite nor a wrongdoer, unless he fears them: then he prays and repeats; Abu Dawud said: when you pray behind the one who says the Quran is created, repeat. According to the other transmission, prayer behind him is valid: al-Athram said: I asked Abu Abdallah: the Rafidites who speak of what you know? He said: yes, I order repetition. He was told: and likewise the people of innovation? He said: no: some of them keep silent and others speak; and since he said: one does not pray behind the Murji'ite when he calls, it follows that he does not order repetition otherwise.
The basis of the first opinion is Jabir's hadith: "Let no woman lead a man in prayer, nor a wicked man a believer, unless he overpowers him with an authority whose sword and whip are feared" (weak hadith reported by Ibn Majah, 1081, and al-Bayhaqi, 3/90 and 171): this hadith is more specific than the previous one and must therefore take precedence; their general hadith is followed for the Friday and festival prayers, then one repeats. As for the wrongdoer in deeds, such as the fornicator and the drinker of intoxicants, it is reported of Ahmad that one does not pray behind him, according to his words: "Do not pray behind a wicked nor a corrupt man". Abu Dawud said: I heard Ahmad asked about an imam who said: I will pray Ramadan with you for such and such dirhams; he said: I ask Allah for well-being: who would pray behind that one? It is reported of him: one does not pray behind the one who does not give zakat, nor behind the one who stipulates conditions, but nothing prevents giving him without a condition; this is the choice of Ibn Aqil.
It is also reported of him that prayer behind him is licit: that is the madhhab of al-Shafi'i, by the Prophet's words: "Pray behind the one who says: there is no god but Allah" (weak hadith, already cited); Ibn Umar prayed with al-Hajjaj, al-Hasan and al-Husayn and other companions prayed with Marwan, those who lived under the authority of Ziyad and his son prayed with them, and they prayed behind al-Walid ibn Uqbah though he had drunk wine: that amounts to a consensus. Abu Dharr reports that the Messenger of Allah said to him: "How will you be when rulers delay the prayer from its time, or nullify it from its time? I said: what do you command me? He said: pray the prayer at its time; if you join it with them, pray: it will be a supererogatory prayer for you" (reported by Muslim, 448). The act of those rulers proves their wrongdoing, and since he is a man whose prayer is valid for himself, following him is valid, like following the just one.
The answer to the first opinion: the mentioned hadith; the imamate includes the charge of recitation, whose performance is not guaranteed, nor the fulfillment of some of its conditions, such as purification, with no sign nor reassuring conjecture; the act of the companions is interpreted by fear of the harm of neglecting the prayer with them; and the account of Abu Dharr proves the validity of the prayer as supererogatory: the dispute concerns only the obligatory. The Friday and festival prayers, however, are prayed behind every righteous and every wicked man; Ahmad himself attended them with the Mu'tazilah, as did the scholars of his time. Muhammad ibn an-Nadr was approached by a man saying he had neighbors of deviant passions who did not attend the Friday prayer; he said to him: that suffices you; what do you say of the one who rejects Abu Bakr and Umar? A wicked man. And of the one who rejects the Prophet? He becomes a disbeliever. And of the one who rejects Ali, the most high? Then he swooned; upon waking he said: reject it, by Him than whom there is no other god: He said: "O you who believe, when the call is made for prayer on the day of Friday, hasten to the remembrance of Allah" (Surah al-Jumu'ah, 9). That prayer is a manifest rite of Islam which only the imams lead: neglecting it behind them tends to neglecting it altogether; it is not repeated behind the one behind whom the others are not repeated; whoever repeats it is an innovator, for it is a commanded prayer whose repetition is not required, unlike the other prayers (ash-Sharh al-Kabir with al-Mughni, 2/408-409; Mu'ani al-Athar, 1/490-491; al-Ifsah, 1/212; Manar as-Sabil, 1/150).
Ibn Rushd said: the cause of their disagreement on the imamate of the wrongdoer is that it is a matter on which the Law is silent, and the analogies contradict one another. The one who holds that wrongdoing does not annul the validity of the prayer, and that the led worshipper needs his imam only for the validity of his prayer, according to the view that the imam bears the follower's sin, permitted the wrongdoer's imamate. The one who analogized the imamate to testimony and suspected the wrongdoer of performing a corrupted prayer, as the witness is suspected of lying, did not permit his imamate. To that goes back the distinction made by some between wrongdoing by interpretation or without interpretation, and between certain wrongdoing or not, for if it is certain, its holder is not excusable in his interpretation (Bidayat al-Mujtahid).