+ -

عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ رضي الله عنه قَالَ: قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ:
«إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ، فَلَمْ يَدْرِ كَمْ صَلَّى ثَلَاثًا أَمْ أَرْبَعًا، فَلْيَطْرَحِ الشَّكَّ، وَلْيَبْنِ عَلَى مَا اسْتَيْقَنَ، ثُمَّ يَسْجُدُ سَجْدَتَيْنِ قَبْلَ أَنْ يُسَلِّمَ، فَإِنْ كَانَ صَلَّى خَمْسًا شَفَعْنَ لَهُ صَلَاتَهُ، وَإِنْ كَانَ صَلَّى إِتْمَامًا لِأَرْبَعٍ كَانَتَا تَرْغِيمًا لِلشَّيْطَانِ».

[صحيح] - [رواه مسلم] - [صحيح مسلم: 571]
المزيــد ...

Abu Sa‘īd al-Khudri (may Allah be pleased with him) reported: The Messenger of Allah (may Allah's peace and blessings be upon him) said:
"When anyone of you is in doubt about his prayer, not knowing how much he prayed, three or four, let him dispel the doubt and build upon what he is certain about, then perform two prostrations before making Taslīm. If he has prayed five, they will make his prayer even-numbered, and if he has prayed exactly four, they will be humiliation for the devil."

[Authentic hadith] - [Narrated by Muslim] - [Sahih Muslim - 571]

Explanation

The Prophet (may Allah's peace and blessings be upon him) clarified that if the person praying is in doubt about his prayer, not knowing how much he prayed, three or four, let him exclude the extra number that he doubts and not take it into account, so three is the number he is certain about, and let him perform a fourth Rak'ah, then offer two prostrations before making Taslīm (salutation of peace ending the prayer).
If he has actually offered four Rak‘ahs, they will become five by adding a Rak‘ah, and the two prostrations of forgetfulness stand for one Rak‘ah, so the total will be even, not odd. On the other hand, if he has prayed four in total with the extra Rak‘ah, then he has performed what is due on him without any increase or decrease.
In this case, the two prostrations of forgetfulness will bring humiliation and defeat to the devil and will drive him away from fulfilling his goal because he threw him into confusion regarding his prayer and tried to spoil it. However, man's prayer became complete when he obeyed Allah Almighty through prostration, which was the same act through which Satan disobeyed Allah when he refused to obey Him by prostrating to Adam.

Translation: Urdu Spanish Indonesian Bengali French Turkish Russian Bosnian Sinhala Indian Chinese Persian Vietnamese Tagalog Kurdish Hausa Portuguese Malayalam Telgu Swahili Thai Pashto Assamese Swedish amharic Dutch Gujarati Kyrgyz Nepali Yoruba Dari Somali Kinyarwanda Romanian Malagasy Oromo Kannada
View Translations

Benefits from the Hadith

  1. When the one praying is in doubt about his prayer and none of the two probabilities is stronger than the other, then he should dispel the doubt and act in accordance with certainty, which is the lesser number of Rak‘ahs. He should, thus, complete his prayer and offer the prostrations of forgetfulness before making Taslīm, then he should make Taslīm.
  2. These two prostrations are a means of redressing any deficiency in the performance of the prayer and warding off the devil, despised, disgraced, and far from fulfilling his goal.
  3. The doubt to which the Hadīth refers is the hesitation that involves no preponderance. However, if there is doubt and it is preponderant, then one should act upon it.
  4. Encouraging the act of struggling against the whisperer and warding him off by obeying the Shariah commands.
More ...