Did it ever happen that the Prophet (peace and blessings of Allaah be upon him) started to pray when he was junub by mistake?
Question

                We seek a detailed answer about this Hadeeth:

Narrated by Abu Hurairah, may Allah be pleased with him, that the prophet (PBUH) went out to pray, and when he said Allahu Akbar, he left and referred to them to stay as they are. Then he left, had ghusl and came back with his hair dripping of water, and led the prayer. After he fished the prayer he said: “I was junub and forgot to make ghusl” narrated by Ahmed.
Praise be to Allah.
    Firstly: 

    This incident was narrated from the Messenger of Allaah  
    (peace and blessings of Allaah be upon him) in the books of Sunnah. To sum 
    up, the people had formed their rows to pray behind the Prophet  (peace 
    and blessings of Allaah be upon him), and he stood before them as if he was 
    going to lead them in prayer, then he remembered that he was junub, so he 
    gestured to them to stay where they were, and he went and did ghusl, then he 
    came back to them with his head dripping with water. 

    But there are some differences in the reports: 

    Did the Prophet  (peace and blessings of Allaah be upon 
    him) say takbeer and then remember that he was junub? Or did he remember 
    before the opening takbeer? 

    The reports may be summed up as follows: 

    1 – A version which clearly states that he remembered that he 
    was junub before he started to pray: 

    This version was narrated by ‘Abd-Allaah ibn Wahb from Yoonus 
    from al-Zuhri from Abu Salamah ibn ‘Abd al-Rahmaan ibn ‘Awf from Abu 
    Hurayrah (may Allaah be pleased with him), as was narrated in Saheeh
    Muslim (605), where it says: The iqaamah for prayer was given, and we 
    stood up and made the rows straight before the Messenger of Allaah  
    (peace and blessings of Allaah be upon him) came out to us. Then the 
    Messenger of Allaah  (peace and blessings of Allaah be upon him) came 
    and stood in his prayer place before saying the takbeer, then he went away 
    and said to us: “Stay where you are.” We remained standing, waiting for him, 
    until he came out to us. He had done ghusl, and his head was dripping water. 
    Then he said takbeer and led us in prayer. 

    Saalih ibn Kaysaan narrated from al-Zuhri – as was recorded 
    by al-Bukhaari (639) as follows: 

    … until, when he was standing in his prayer place and we were 
    waiting for him to say takbeer, he turned and said, ‘Stay where you are.’ We 
    stayed where we were until he came out to us with his head dripping with 
    water, as he had done ghusl. 

    2 – A version which clearly states that he said takbeer and 
    started to pray, then remembered that he was junub. 

    This was narrated by Usaamah ibn Zayd from ‘Abd-Allaah ibn 
    Yazeed, the freed slave of al-Aswad ibn Sufyaan, from Muhammad ibn ‘Abd 
    al-Rahmaan ibn Thawbaan, from Abu Hurayrah (may Allaah be pleased with him), 
    as is recorded by Ibn Majaah in al-Sunan (1220), al-Daaraqutni 
    (1/361) and al-Bayhaqi in al-Sunan al-Kubra (2/397). This version 
    says:

    The Prophet  (peace and blessings of Allaah be upon him) 
    came out to pray and said the Takbeer, then he gestured to them to wait. He 
    went and did ghusl, and his head was dripping with water whilst he led them 
    in prayer. When he finished he said, “I came out to you in a state of 
    janaabah, and I forgot until I had started to pray.” 

    But there is some weakness in this isnaad with regard to 
    Usaamah ibn Zayd al-Laythi, Abu Zayd al-Madani. In his biography in 
    Tahdheeb al-Tahdheeb (1/209) it says: He was regarded as matrook by 
    Yahya ibn Sa’eed. Ahmad said: he is nothing. Abu Haatim said: His hadeeth 
    may be written down but should not be used as evidence. Al-Nasaa’i said: He 
    is not strong. Ibn Hibbaan said: He makes mistakes although he is of sound 
    character. End quote. No one narrated that he was trustworthy except Yahya 
    ibn Ma’een, but in another report from him he said that his ahaadeeth were 
    regarded as munkar. 

    This version was also narrated via Muhammad ibn Sireen from 
    Abu Hurayrah (may Allaah be pleased with him), that the Prophet  (peace 
    and blessings of Allaah be upon him) said takbeer, leading them in Fajr 
    prayer, then he gestured to them and went away, then he came back with his 
    head dripping, and led them in prayer. He said: “I am only human; I was 
    junub and I forgot.” 

    Narrated by al-Tabaraani in al-Awsat (5/317) and 
    al-Sagheer (2/74). He said: No one narrated it from Ibn ‘Awn except 
    al-Hasan ibn ‘Abd al-Rahmaan, and it was narrated only by Abu’l-Rabee’ 
    al-Haarithi. It was also narrated by al-Bayhaqi (2/398). But this report 
    contains an error. The correct version was narrated from Muhammad ibn Sireen 
    from the Prophet  (peace and blessings of Allaah be upon him). That is 
    based on two points: 

    1 – The trustworthy narrators among the companions of Ibn 
    ‘Awn differed with the report of al-Hasan ibn ‘Abd al-Rahmaan. Al-Bayhaqi 
    said: It was narrated by Ismaa’eel ibn ‘Aliyah and others from Ibn ‘Awn from 
    Muhammad from the Prophet  (peace and blessings of Allaah be upon him) 
    in a mursal report.  End quote.  

    2 – Others followed Ibn ‘Awn in his mursal narrations. Abu 
    Dawood (233) said: It was narrated by Ayyoob, Ibn ‘Awn and Hishaam from 
    Muhammad in a mursal report from the Prophet  (peace and blessings of 
    Allaah be upon him). End quote. 

    Al-Bayhaqi said in Ma’rifat al-Sunan wa’l-Athaar 
    (1306): This is how it was narrated by Ayyoob and Hishaam from Muhammad via 
    a mursal isnaad, and it was narrated by al-Hasan ibn ‘Abd al-Rahmaan 
    al-Haarithi from Ibn ‘Awn, from Muhammad, from Abu Hurayrah, but the former 
    is more sound. End quote. 

    There is some corroborating evidence in other reports which 
    say that the Prophet  (peace and blessings of Allaah be upon him) 
    remembered he was junub after he had said the takbeer and started the 
    prayer: 

    1-

    It was narrated from al-Hasan from Abu Bakrah (may Allaah be 
    pleased with him) that the Messenger of Allaah  (peace and blessings of 
    Allaah be upon him) started to pray Fajr, then he gestured with his hand, 
    saying stay where you are, then he came with his head dripping and prayed. 

    Narrated by Abu Dawood (233), Ahmad (5/41), Ibn Khuzaymah 
    (3/62), Ibn Hibbaan (6/5), al-Bayhaqi in al-Sunan al-Kubra (3/94) and 
    al-Tahhaawi in Bayaan Mushkil al-Athaar (2/86). According to some 
    versions it says “and he said takbeer”. 

    Ibn Rajab said in Fath al-Baari (3/599): The hadeeth 
    of al-Hasan from Abu Bakrah is like a mursal report, because al-Hasan did 
    not hear from Abu Bakrah according to Imam Ahmad and the majority of earlier 
    scholars. End quote. 

    2-

    It was narrated that Anas ibn Maalik said: The Messenger of 
    Allaah  (peace and blessings of Allaah be upon him) began to pray, and 
    he said takbeer and we said takbeer with him, then he gestured to the people 
    (as if saying) stay where you are. Then we remained standing until the 
    Messenger of Allaah  (peace and blessings of Allaah be upon him) came to 
    us having done ghusl, and his head was dripping with water. 

    Narrated by al-Daaraqutni (1/362), al-Tabaraani in 
    al-Awsat (4/92), al-Bayhaqi in al-Sunan al-Kubra (2/399) via 
    Mu’aadh al-‘Anbari from Sa’eed ibn Abi ‘Aroobah from Qataadah from Anas. 

    This hadeeth was also narrated in a mursal report from 
    Qataadah from Bakr ibn ‘Abd-Allaah al-Muzani. 

    3-

    It was narrated that ‘Ali ibn Abi Taalib (may Allaah be 
    pleased with him) said: The Messenger of Allaah  (peace and blessings of 
    Allaah be upon him) led us in prayer one day, and he left, then he came with 
    his head dripping water and led us in prayer. Then he said: I led you in 
    prayer just now when I was junub. Whoever experiences something like I 
    experienced, or feels cramps in his belly (as if needing to defecate), let 
    him do what I did.” 

    Narrated by Ahmad (1/99), al-Tabaraani (6/272) and al-Bazzaar 
    (890). Its isnaad includes Ibn Luhay’ah, who is somewhat weak. Al-Tabaraani 
    said in al-Awsat (6/272). This hadeeth was only narrated from ‘Ali 
    with this isnaad, and it was narrated only by Ibn Luhay’ah. 

    4 – It was narrated from ‘Ata’ ibn Yasaar that the Messenger 
    of Allaah  (peace and blessings of Allaah be upon him) said takbeer in 
    one of the prayers, then he gestured to them with his hand to stay put, and 
    he went away, then he came back with traces of water on his skin. 

    Narrated by Maalik in al-Muwatta’ (1/48/no. 110) with 
    a saheeh isnaad to ‘Ata’ who was one of the Taabi’een. 

    Al-Bayhaqi said in al-Sunan al-Kubra (2/398): 

    The report of Abu Salamah from Abu Hurayrah (may Allaah be 
    pleased with him) is more saheeh than the report of Ibn Thawbaan from him, 
    but with  the report of Ibn Thawbaan from him there is the report of Abu 
    Bakrah, and the report of ‘Ata’ ibn Yasaar and Ibn Sireen is mursal. It was 
    also narrated from Anas ibn Maalik. End quote. 

    To sum up: When all these many isnaads are taken together, 
    which report that the Prophet  (peace and blessings of Allaah be upon 
    him) said takbeer and started to pray before he remembered that he was 
    junub, especially the saheeh reports from Ibn Sireen, Bakr al-Muzani and 
    ‘Ata’ ibn Yasaar, all of that indicates that the incident did indeed take 
    place, and there is no contradiction between these reports and the report of 
    Abu Hurayrah which says that it happened before he said the takbeer, because 
    the incident may have been repeated, so it happened in one way on one 
    occasion and in another way on another occasion. Thus it is possible to 
    reconcile the reports.  

    Abu Haatim Ibn Hibbaan said in his Saheeh (6/7): 

    This is something that happened twice, on separate occasions. 
    The Prophet  (peace and blessings of Allaah be upon him) came out on one 
    occasion and said takbeer, then he remembered that he was junub, so he left 
    and did ghusl, then he came back and resumed the prayer; and on another 
    occasion he came out and he stood to say takbeer, then he remembered that he 
    was junub before he said takbeer, so he went and did ghusl, then he came 
    back and led them in prayer, and there is no contradiction between the two 
    reports. End quote. 

    Al-Nawawi said in Sharh Muslim (5/103): 

    It may be that they were two separate incidents, which is 
    more likely. End quote. 

    There is no problem, praise be to Allaah. The Prophet  
    (peace and blessings of Allaah be upon him) was a human being and he forgot 
    as all people forget. He made mistakes in his prayer on many occasions, and 
    none of the scholars denies that, rather they said that he was infallible 
    and protected from forgetting anything of the wahy (revelation) completely 
    in such a way that would cause it to be lost. 

    Secondly: 

    With regard to the fiqh of the hadeeth and deriving rulings 
    from it: 

    It indicates that if the imam leads the people in prayer when 
    he is not in a state of purity (tahaarah) by mistake, then the prayer of the 
    people praying behind him is not affected, and it remains valid; and the 
    imam is the only one who is enjoined to repeat it, not those who prayed 
    behind him. 

    The reason for that is that the Prophet  (peace and 
    blessings of Allaah be upon him) went back and did ghusl, then he came and 
    said takbeer for his prayer, and the people behind him were in their rows 
    and were still in a state of prayer, and he did not tell them to repeat the 
    takbeer with him. 

    Ibn Rajab said in Fath al-Baari (3/600-602): 

    There is nothing in the hadeeth to indicate that the Prophet 
     (peace and blessings of Allaah be upon him) continued from where he had 
    left off from the opening takbeer when he forgot that he was junub, so it 
    could only have been one of two scenarios: 

    1 – When he  (peace and blessings of Allaah be upon him) 
    came back he said the opening takbeer and the people said takbeer with him 

    2 – or the Prophet  (peace and blessings of Allaah be 
    upon him) repeated the opening takbeer, and the people behind him continued 
    from their previous takbeer. 

    This is what was suggested by al-Shaafa’i, who regarded it as 
    the basis for the validity of the prayer of one who is in a state of purity 
    behind an imam who prays in a state of impurity because he  forgot. 

    Ibn ‘Abd al-Barr said: some of the companions of Maalik 
    agreed with al-Shaafa’i concerning that. 

    Two reports were narrated from Imam Ahmad concerning members 
    of the congregation starting and completing the prayer if they follow one 
    who forgot that he was impure, then he remembers it during his prayer. 

    It was narrated from al-Hasan that they should complete their 
    prayers. 

    The view of al-Shaafa’i is that it makes no difference 
    whether the imam forgot that he was impure or he remembered it, if the 
    person who prayed behind him did not know, and the one who prayed behind him 
    does not have to repeat his prayer. 

    This is the view of Ibn Naafi’ among the Maalikis, and Ibn 
    ‘Abd al-Barr narrated it from a number of fuqaha’ in the regions and 
    scholars of hadeeth. 

    And it was narrated from Maalik and Ahmad that the one who 
    prayed behind the imam has to repeat the prayer. 

    Hammaad, Abu Haneefah and his companions, and Sufyaan 
    al-Thawri –  according to the better known report from him –  said that the 
    one who prayed behind the imam should repeat the prayer, even if the imam 
    forgot and did not remember until he completed his prayer. End quote. 

    On our site you will find a number of answers which state 
    that the prayer of the one who prayed behind an imam is valid if it becomes 
    apparent that the imam is without wudoo’, and that it is only the imam who 
    has to repeat the prayer, not those who prayed behind him. See 
    27091 and 
    85011. 

    And Allaah knows best.