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.
suyuti:27717a
Request/Fix translation

  

السيوطي:٢٧٧١٧a

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

[خ] البخاري في التاريخ، [طس] الطبرانى في الأوسط وتمام، وابن عساكر عن عثمان

See similar narrations below:

Collected by Aḥmad, Suyūṭī
ahmad:450Muḥammad b. ʿAbdullāh b. al-Zubayr > Masarrah b. Maʿbad > Yazīd b. Abū Kabshahaʿan ʿUthmān b. ʿAffān

A man came to the Prophet ﷺ and said: O Messenger of Allah ﷺ, I prayed but I do not know whether I did an even number [of rakʿahs] or an odd number. The Messenger of Allah ﷺ said: ʿBeware lest the Shaitan toy with you in your prayer. Whoever among you prays and does not know whether he did an even number [of rakʿahs] or an odd number, let him prostrate twice, for that will complete his prayer.ʿ It was narrated that Masarrah bin Maʿbad said: Yazeed bin Abi Kabshah led us in praying ʿAsr, then he turned to us after the prayer and said: I prayed with Marwan bin al-Hakam and he did two prostrations like these, then he turned to us and told us that he prayed with ‘Uthman ؓ , who narrated from the Prophet ﷺ ... and he mentioned a similar report.  

أحمد:٤٥٠حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللهِ بْنِ الزُّبَيْرِ حَدَّثَنَا مَسَرَّةُ بْنُ مَعْبَدٍ عَنْ يَزِيدَ بْنِ أَبِي كَبْشَةَعَنْ عُثْمَانَ بْنِ عَفَّانَ قَالَ

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

suyuti:9381a
Request/Fix translation

  

السيوطي:٩٣٨١a

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

[حم] أحمد عن عثمان