أَخْبَرَنَا يَحْيَى بْنُ حَبِيبِ بْنِ عَرَبِيٍّ، قَالَ حَدَّثَنَا خَالِدٌ، عَنِ ابْنِ عَجْلاَنَ، عَنْ زَيْدِ بْنِ أَسْلَمَ، عَنْ عَطَاءِ بْنِ يَسَارٍ، عَنْ أَبِي سَعِيدٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏"‏ إِذَا شَكَّ أَحَدُكُمْ فِي صَلاَتِهِ فَلْيُلْغِ الشَّكَّ وَلْيَبْنِ عَلَى الْيَقِينِ فَإِذَا اسْتَيْقَنَ بِالتَّمَامِ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ قَاعِدٌ فَإِنْ كَانَ صَلَّى خَمْسًا شَفَعَتَا لَهُ صَلاَتَهُ وَإِنْ صَلَّى أَرْبَعًا كَانَتَا تَرْغِيمًا لِلشَّيْطَانِ ‏"‏ ‏.‏
Translation
It was narrated from Abu Sa'eed Al-Khudri that

The Prophet (ﷺ) said: "If one of you does not know whether he prayed three or four (rak'ahs), let him pray a rak'ah then prostrate twice after that when he is sitting. Then if he prayed five (rak'ahs), they (the two prostrations) will make his prayer even-numbered, and if he had prayed four, they will annoy and humiliate the shaitan."

Comment

The Book of Forgetfulness (In Prayer)

Sunan an-Nasa'i - Hadith 1239

Hadith Text

The Prophet (ﷺ) said: "If one of you does not know whether he prayed three or four (rak'ahs), let him pray a rak'ah then prostrate twice after that when he is sitting. Then if he prayed five (rak'ahs), they (the two prostrations) will make his prayer even-numbered, and if he had prayed four, they will annoy and humiliate the shaitan."

Scholarly Commentary

This noble hadith establishes the procedure for the prayer of uncertainty (Salaat al-Shakk) when a worshipper doubts the number of rak'ahs performed. The wisdom of this legislation manifests divine mercy, providing a practical solution that preserves the validity of prayer despite human forgetfulness.

The command to add one rak'ah then perform two prostrations of forgetfulness (Sajdatay al-Sahw) demonstrates the Shari'ah's comprehensive approach. When one prays an additional rak'ah, if the original prayer was three rak'ahs, it becomes four - the complete number for Zuhr, Asr, or Isha. If it was originally four, the additional rak'ah makes five, but the two prostrations rectify this excess, making it effectively four rak'ahs in divine acceptance.

The phrase "they will annoy and humiliate the shaitan" reveals profound spiritual wisdom. Satan seeks to disrupt worship through doubt and confusion. By following this prophetic guidance, the believer frustrates Satan's schemes, transforming potential spiritual defeat into an act of obedience that vexes the devil.

This teaching reflects the principle of taking the cautious approach (ihtiyat) in worship while maintaining the prayer's fundamental structure. The two prostrations serve as both correction and spiritual protection, ensuring the prayer's validity while repelling satanic influence through strict adherence to prophetic guidance.