Toggle above to switch between keyword search and direct hadith lookup

Hadith 1024

نَا مُحَمَّدُ بْنُ الْمُثَنَّى ، نَا يَحْيَى بْنُ مُحَمَّدِ بْنِ قَيْسٍ الْمَدَنِيُّ ، قَالَ : سَمِعْتُ زَيْدَ بْنَ أَسْلَمَ ، ح وَحَدَّثَنَا الرَّبِيعُ بْنُ سُلَيْمَانَ ، حَدَّثَنَا شُعَيْبٌ يَعْنِي ابْنَ اللَّيْثِ ، حَدَّثَنَا اللَّيْثُ ، عَنْ مُحَمَّدِ بْنِ عَجْلانَ ، عَنْ زَيْدِ بْنِ أَسْلَمَ ، ح وَحَدَّثَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ الدَّوْرَقِيُّ ، حَدَّثَنَا يَزِيدُ بْنُ هَارُونَ ، أَخْبَرَنَا الْمَاجِشُونُ عَبْدُ الْعَزِيزِ بْنُ عَبْدِ اللَّهِ بْنِ أَبِي سَلَمَةَ ، حَدَّثَنَا زَيْدُ بْنُ أَسْلَمَ ، ح وَحَدَّثَنَا يُونُسُ بْنُ عَبْدِ الأَعْلَى ، أَخْبَرَنَا ابْنُ وَهْبٍ ، أَخْبَرَنِي هِشَامٌ وَهُوَ ابْنُ سَعْدٍ ، أَنَّ زَيْدَ بْنَ أَسْلَمَ حَدَّثَهُمْ ، وَهَذَا ، حَدِيثُ الرَّبِيعِ ، وَهُوَ أَحْسَنُهُمْ سِيَاقًا لِلْحَدِيثِ ، عَنْ عَطَاءِ بْنِ يَسَارٍ ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ ، عَنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، أَنَّهُ قَالَ : " إِذَا شَكَّ أَحَدُكُمْ فِي صَلاتِهِ فَلَمْ يَدْرِ كَمْ صَلَّى وَاحِدَةً أَمِ اثْنَتَيْنِ أَمْ ثَلاثًا أَمْ أَرْبَعًا ، فَلْيُتَمِّمْ مَا شَكَّ فِيهِ ، ثُمَّ يَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ ، فَإِنْ كَانَتْ صَلاتُهُ نَاقِصَةً فَقَدْ أَتَمَّهَا ، وَالسَّجْدَتَانِ تَرْغِيمٌ لِلشَّيْطَانِ ، وَإِنْ كَانَ أَتَمَّ صَلاتَهُ فَالرَّكْعَةُ وَالسَّجْدَتَانِ لَهُ نَافِلَةٌ "
Sayyiduna Abu Sa'id Khudri رضي الله عنه narrates from the Messenger of Allah صلى الله عليه وسلم that he صلى الله عليه وسلم said: "When any one of you is uncertain in his prayer and does not know how many rak'ahs he has prayed—one, two, three, or four—then he should complete the number of rak'ahs about which he is in doubt, then while sitting in tashahhud, he should perform two prostrations. Thus, if his prayer was incomplete, he has now completed it, and the two prostrations will be a means of humiliation and disgrace for Satan. And if he had already completed his prayer, then this (extra) rak'ah and the two prostrations will be counted as voluntary (nafl) for him."
إِذَا بَنَى عَلَى الْيَقِينِ فَيَسْجُدُهُمَا قَبْلَ السَّلَامِ لَا بَعْدَ السَّلَامِ ضِدَّ قَوْلِ مَنْ زَعَمَ أَنَّ سَجْدَتَيِ السَّهْوِ فِي جَمِيعِ الْأَحْوَالِ تَكُونَانِ بَعْدَ السَّلَامِ
If he builds upon certainty, then he performs the two prostrations before the salam, not after the salam, contrary to the statement of those who claim that the two prostrations of forgetfulness are, in all cases, to be performed after the salam.
Hadith Reference صحيح ابن خزيمه / جماع أبواب السهو فى الصلاة / 1024