Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:1216Sufyān b. Wakīʿ > Yūnus b. Bukayr > Ibn Isḥāq > al-Zuhrī > Abū Salamah > Abū Hurayrah

“The Satan comes to any one of you while he is praying and comes between him and his soul, until he does not know whether he as added something or omitted something. If that happens, then he should prostrate twice before the Salam, then he should say the Salam.”  

ابن ماجة:١٢١٦حَدَّثَنَا سُفْيَانُ بْنُ وَكِيعٍ حَدَّثَنَا يُونُسُ بْنُ بُكَيْرٍ حَدَّثَنَا ابْنُ إِسْحَاقَ حَدَّثَنِي الزُّهْرِيُّ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ

أَنَّ النَّبِيَّ ﷺ قَالَ إِنَّ الشَّيْطَانَ يَأْتِي أَحَدَكُمْ فِي صَلاَتِهِ فَيَدْخُلُ بَيْنَهُ وَبَيْنَ نَفْسِهِ حَتَّى لاَ يَدْرِي زَادَ أَوْ نَقَصَ فَإِذَا كَانَ ذَلِكَ فَلْيَسْجُدْ سَجْدَتَيْنِ قَبْلَ أَنْ يُسَلِّمَ ثُمَّ يُسَلِّمْ  


See similar narrations below:

Collected by Ibn Mājah, Aḥmad, Suyūṭī
ibnmajah:1217Sufyān b. Wakīʿ > Yūnus b. Bukayr > Ibn Isḥāq > Salamah b. Ṣafwān b. Salamah > Abū Salamah > Abū Hurayrah

“The Satan comes between the son of Adam and his soul, and he does not know how many Rak’ah he has prayed. If a person notices that, then let him prostrate twice before he says the Salam.”  

ابن ماجة:١٢١٧حَدَّثَنَا سُفْيَانُ بْنُ وَكِيعٍ حَدَّثَنَا يُونُسُ بْنُ بُكَيْرٍ حَدَّثَنَا ابْنُ إِسْحَاقَ أَخْبَرَنِي سَلَمَةُ بْنُ صَفْوَانَ بْنِ سَلَمَةَ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ

أَنَّ النَّبِيَّ ﷺ قَالَ إِنَّ الشَّيْطَانَ يَدْخُلُ بَيْنَ ابْنِ آدَمَ وَبَيْنَ نَفْسِهِ فَلاَ يَدْرِي كَمْ صَلَّى فَإِذَا وَجَدَ ذَلِكَ فَلْيَسْجُدْ سَجْدَتَيْنِ قَبْلَ أَنْ يُسَلِّمَ  

ahmad:7803Ibrāhīm > Rabāḥ > Maʿmar > al-Zuhrī > Abū Salamah > Abū Hurayrah

[Machine] From the Prophet, ﷺ , he said: Indeed, Satan comes to one of you during his prayer, and he does not know whether he has increased or decreased [his prayer]. So, when one of you finds that, let him perform two prostrations.  

أحمد:٧٨٠٣حَدَّثَنَا إِبْرَاهِيمُ حَدَّثَنَا رَبَاحٌ عَنْ مَعْمَرٍ عَنِ الزُّهْرِيِّ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ

عَنِ النَّبِيِّ ﷺ قَالَ إِنَّ الشَّيْطَانَ يَأْتِي أَحَدَكُمْ فِي صَلَاتِهِ فَلَا يَدْرِي أَزَادَ أَمْ نَقَصَ فَإِذَا وَجَدَ أَحَدُكُمْ ذَلِكَ فَلْيَسْجُدْ سَجْدَتَيْنِ  

suyuti:5626a

Messenger of Allah ﷺ said, "When anyone of you stands for the prayers, Satan comes and puts him in doubts till he forgets how many rakʿat he has prayed. So if this happens to anyone of you, he should perform two prostrations of Sahu while sitting. (Using translation from Bukhārī 1232)   

السيوطي:٥٦٢٦a

"إِنَّ الشَّيطَانَ يَأْتِي أَحَدَكُمْ في صَلاته فَيُلْبِسُ عليه حَتَّى لا يَدْرى كَمْ صَلَّى. فَإِذَا وَجَدَ ذَلكَ أَحَدُكُمْ فَليَسْجُدْ سَجْدَتَينِ وَهُوَ جَالِسٌ قَبْلَ أن يُسَلَّمَ، ثُمَّ يُسَلِّمْ".  

[ت] الترمذي حسن صحيح، عن أَبي هريرة
suyuti:2043a
Request/Fix translation

  

السيوطي:٢٠٤٣a

"إِذا شَكَّ أحدُكُمْ في صَلاتِه فلم يَدْر زادَ أوْ نَقَص؟ فإِنْ كانَ شكّ في الواحدةِ وَالثِّنتين فليجْعلها واحدةً حتَّى يكونَ الوهْمُ في الزِّيادةِ ثمَّ يَسْجُدْ سجدتينِ وهو جالسٌ قَبْل أنْ يُسَلِّمَ ثُمَّ يُسَلِّمْ ".  

[ش] ابن أبى شيبة عن عبد الرحمن بن عوف