Hadith 1026

حَدَّثَنَا الْقَعْنَبِيُّ ، عَنْ مَالِكٍ ، عَنْ زَيْدِ بْنِ أَسْلَمَ ، عَنْ عَطَاءِ بْنِ يَسَارٍ ، أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلَا يَدْرِي كَمْ صَلَّى ثَلَاثًا أَوْ أَرْبَعًا فَلْيُصَلِّ رَكْعَةً وَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ قَبْلَ التَّسْلِيمِ ، فَإِنْ كَانَتِ الرَّكْعَةُ الَّتِي صَلَّى خَامِسَةً شَفَعَهَا بِهَاتَيْنِ ، وَإِنْ كَانَتْ رَابِعَةً فَالسَّجْدَتَانِ تَرْغِيمٌ لِلشَّيْطَانِ " .
Narrated Ata ibn Yasar: The Prophet ﷺ said: When one of you is in doubt about his prayer, and does not know how much he has prayed, three or four rak'ahs, he should pray one (additional) rak'ah and make two prostrations while sitting before giving the salutation. If the (additional) rak'ah which he prayed is the fifth one, he will make it an even number by these two prostrations. If it is the fourth one, the two prostrations will be a disgrace for the devil.
Hadith Reference Sunan Abi Dawud / Prayer (Tafarah Abwab Estaftah Assalah) / Hadith: 1026
Hadith Grading الألبانی: صحيح  |  زبیر علی زئی: صحيح, وللحديث شواھد عند ابن عبد البر في التمھيد (5/20 وسنده صحيح)
Hadith Takhrij « انظر حدیث رقم : (1024)، (تحفة الأشراف: 4163، 19091) (صحیح) » (یہ حدیث بھی حدیث نمبر: (1024) کی طرح مرفوع اور متصل ہے، اس میں امام مالک نے ابو سعید خدری رضی اللہ عنہ کو جان بوجھ کر حذف کر دیا ہے جیسا کہ ان کا طریقہ ہے)