Hadithcore
Sahih Muslim, 1110
sahih

'A'isha reported that a person came to the Apottle of Allah (ﷺ) asking for a fatwa (religious verdict). She ('A'isha) had been overhearing it from behind the curtain. 'A'isha added that he (the person) had said:

Messenger of Allah, (the time) of prayer overtakes me as I am in a state of junub; should I observe fast (in this state)? Upon this the Messenger of Allah (ﷺ) said: (At times the time) of prayer overtakes me while I am in a state of junub, and I observe fast (in that very state), whereupon he said: Messenger of Allah, you are not like us Allah has pardoned all your sins, the previous ones and the later ones. Upon this he (the Prophet) said: By Allah, I hope I am the most God-fearirg of you, and possess the best knowledge among you of those (things) against which I should guard.

حَدَّثَنَا يَحْيَى بْنُ أَيُّوبَ، وَقُتَيْبَةُ، وَابْنُ، حُجْرٍ قَالَ ابْنُ أَيُّوبَ حَدَّثَنَا إِسْمَاعِيلُ بْنُ، جَعْفَرٍ أَخْبَرَنِي عَبْدُ اللَّهِ بْنُ عَبْدِ الرَّحْمَنِ، - وَهُوَ ابْنُ مَعْمَرِ بْنِ حَزْمٍ الأَنْصَارِيُّ أَبُو طُوَالَةَ - أَنَّ أَبَا يُونُسَ، مَوْلَى عَائِشَةَ أَخْبَرَهُ عَنْ عَائِشَةَ، - رضى الله عنها - أَنَّ رَجُلاً، جَاءَ إِلَى النَّبِيِّ صلى الله عليه وسلم يَسْتَفْتِيهِ وَهِيَ تَسْمَعُ مِنْ وَرَاءِ الْبَابِ فَقَالَ يَا رَسُولَ اللَّهِ تُدْرِكُنِي الصَّلاَةُ وَأَنَا جُنُبٌ أَفَأَصُومُ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ وَأَنَا تُدْرِكُنِي الصَّلاَةُ وَأَنَا جُنُبٌ فَأَصُومُ ‏"‏ ‏.‏ فَقَالَ لَسْتَ مِثْلَنَا يَا رَسُولَ اللَّهِ قَدْ غَفَرَ اللَّهُ لَكَ مَا تَقَدَّمَ مِنْ ذَنْبِكَ وَمَا تَأَخَّرَ ‏.‏ فَقَالَ ‏"‏ وَاللَّهِ إِنِّي لأَرْجُو أَنْ أَكُونَ أَخْشَاكُمْ لِلَّهِ وَأَعْلَمَكُمْ بِمَا أَتَّقِي ‏"‏ ‏.‏

References2 variants
In-Book Reference
Book 13, Hadith 99
USC-MSA web (English) reference
Book 6, Hadith 2455 (deprecated numbering scheme)
Sharh · explanationclick to expand
Fasting has specific rulings that a Muslim must know and act upon. The Prophet (may Allah's peace and blessings be upon him) demonstrated its obligatory elements, Sunnahs, and disliked things by words and deeds. In this Hadīth, the Mother of the Believers ‘Ā’ishah (may Allah be pleased with her) relates that a man came to the Prophet (may Allah's peace and blessings be upon him) asking him about something relating to the purification of the fasting person from Janābah (major ritual impurity). Meanwhile, ‘Ā’ishah (may Allah be pleased with her) was behind the door, hearing. The man told the Prophet (may Allah's peace and blessings be upon him) that the Fajr prayer would sometimes become due while he was Junub; so, should he observe fast while in this state of Janābah and take a bath after that? Janābah refers to the state after someone ejaculates semen or engages in sexual intercourse. It is called such because of Ijtināb (avoidance) of prayer and worship till getting purified from it. The Messenger of Allah (may Allah's peace and blessings be upon him) said to him: "The prayer also becomes due upon me while I am Junub, and I observe fast." He (may Allah's peace and blessings be upon him) responded to him by action, for it is more profound than saying: Take a bath and observe fast. This demonstrates the legitimacy of fasting by a Junub person before he bathes. This is because the occurrence of Janābah before Fajr does not prevent the intention of fasting or make it invalid. The man said: "You are not like us, O Messenger of Allah, for Allah forgave your past and future sins for you" i.e., this is one of your peculiar traits, and you are not to blame for what you do. In the version by Abu Dāwūd: "So, the Messenger of Allah (may Allah's peace and blessings be upon him) got angry." Indeed, he (may Allah's peace and blessings be upon him) got angry because this man regarded that as a peculiar trait for him without knowledge, though the Prophet (may Allah's peace and blessings be upon him) informed him about his action in response to his question. The Messenger of Allah (may Allah's peace and blessings be upon him) said to him: "By Allah, I hope I am the most fearful of Allah among you", i.e., that I am the most fearful among you of His punishment, "and the most knowledgeable among you of the things I should be heedful of" i.e., that I am the most knowledgeable among you of that by which I heed Allah Almighty. The hope of the Prophet (may Allah's peace and blessings be upon him) would surely materialize, by consensus. This involves criticism of those who attribute to him neglect in worship for reliance upon the forgiveness of his sins..
Related hadiths2
Compare isnād across 2 related chains →