and a woman, and they are in a supererogatory prayer (tatawwu'), they stand behind the Imam and the woman stands behind them, as Anas narrated that the Messenger of Allah (peace and blessings of Allah be upon him) led them in prayer. He said: "So I and the orphan stood behind him, and the woman behind us, and the Messenger of Allah (peace and blessings of Allah be upon him) prayed two rak'ahs for us, then he turned away." Agreed upon. (13) If it is an obligatory prayer (fard), he places the man to his right and the boy to his left, as Abdullah ibn Mas'ud did with Alqama and al-Aswad, and it was narrated from the Prophet (peace and blessings of Allah be upon him) that he did that. Recorded by Abu Dawud. (14) If they both stand to his right, there is no harm. And if they stand behind him? Al-Athram narrated that Ahmad hesitated on this issue and said: "I do not know." Then the hadith of Anas was mentioned to him, and he said: "That is in the supererogatory prayer." Our companions differed on this matter. Some of them said: "It is not valid, because a boy is not fit to be an Imam for men in the obligatory prayers (15), so he does not align with them, like the woman." Ibn Aqil said: "It is valid, because it is valid for him to align with a man in a supererogatory prayer, so it is valid in the obligatory prayer, like the one performing a supererogatory prayer who stands with the one performing an obligatory prayer. It is not required for the validity of his alignment that his imamate be valid, evidenced by the profligate (fasiq), the slave, the traveler in Friday prayer, and the one performing an obligatory prayer with one performing a supererogatory prayer. It differs from the woman, because it is valid for [the boy] to align with men in supererogatory prayer and lead them in it according to one narration, unlike the woman." Al-Hasan said regarding three people, one of whom is a woman: "They stand separately, one behind the other." Our evidence is the hadith of Anas, and it is the opinion of most scholars; we know of no one who disagreed with it except al-Hasan. Following the Sunnah is better, and the opinion of al-Hasan leads to the man standing alone, and the hadith of Wabisa and Ali ibn Shayban refutes it. (16) If men, boys, hermaphrodites (khuntha), and women gather, the men move forward, then the boys, then the hermaphrodites, then the women, because the Prophet (peace and blessings of Allah be upon him) prayed and placed [the men in rows, then placed] (17) the young boys behind them. Recorded by Abu Dawud. (18)
Section: If a woman stands in the row of men (19), it is disliked, but her prayer is not invalidated, nor is the prayer of the one next to her. This is the school of al-Shafi'i. Abu Bakr said: "The prayer of the one next to her and behind her is invalidated, but not hers." This is the opinion of Abu Hanifa, because he is prohibited from standing next to her, resembling the case if he stood in front of the Imam. Our evidence is that if she stood [in that position] outside of prayer, his prayer would not be invalidated, so it is the same in prayer. It has been established that Aisha would lie down in front of the Messenger of Allah (peace and blessings of Allah be upon him) while he was praying. (20) As for their argument that he is prohibited: we say that she is the one prohibited from standing with...
= 1/143. And al-Nasa'i, in: The Chapter on if there are two men and two women, and The Chapter on the station of the Imam... etc., and The Chapter on congregation if there are three... etc., from the Book of Imamate. Al-Mujtaba 2/67, 68, 80. And Ibn Majah, in: The Chapter on two people being a congregation, from the Book of Establishing Prayer (Iqama). Sunan Ibn Majah 1/312. And Imam Ahmad, in: al-Musnad 1/215, 252, 284, 285, 287, 341, 347, 354, 357, 360, 364, 365, 3/242, 258. (13) Recorded by al-Bukhari, in: The Chapter on praying on a mat, from the Book of Prayer. Sahih al-Bukhari 1/106, 107. And Muslim, in: The Chapter on the permissibility of congregation in the supererogatory prayer... etc., from the Book of Mosques. Sahih Muslim 1/457. It was also recorded by Abu Dawud, in: The Chapter on if there are three, how should they stand?, from the Book of Prayer. Sunan Abi Dawud 1/143, 144. And al-Tirmidhi, in: The Chapter on what has been said regarding a man praying while men and women are with him, from the Chapters on Prayer. 'Aridat al-Ahwadhi 2/32. And al-Nasa'i, in: The Chapter on if there are three and a woman, from the Book of Imamate. Al-Mujtaba 2/67. And Imam Malik, in: The comprehensive chapter on the forenoon (duha) prayer. Al-Muwatta 1/153. And Imam Ahmad, in: al-Musnad 3/131, 149, 164. (14) In: The Chapter on if there are three, how should they stand?, from the Book of Prayer. Sunan Abi Dawud 1/144. It was also recorded by al-Nasa'i, in: The Chapter on the station of the Imam if there are three, and the difference regarding that, from the Book of Prayer. Al-Mujtaba 2/66. (15) In (M): "the obligatory prayer (al-fard)."