أَخْبَرَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، عَنْ عَبْدِ الرَّحْمَنِ الأَعْرَجِ، عَنْ عَبْدِ اللَّهِ ابْنِ بُحَيْنَةَ، قَالَ صَلَّى لَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم رَكْعَتَيْنِ ثُمَّ قَامَ فَلَمْ يَجْلِسْ فَقَامَ النَّاسُ مَعَهُ فَلَمَّا قَضَى صَلاَتَهُ وَنَظَرْنَا تَسْلِيمَهُ كَبَّرَ فَسَجَدَ سَجْدَتَيْنِ وَهُوَ جَالِسٌ قَبْلَ التَّسْلِيمِ ثُمَّ سَلَّمَ ‏.‏
Translation
It was narrated from 'Abdullah bin Buhainah that

The Messenger of Allah (ﷺ) stood up during the prayer when he should have sat, so he prostrated twice while sitting, before the taslim.

Comment

Hadith Text & Reference

The Messenger of Allah (ﷺ) stood up during the prayer when he should have sat, so he prostrated twice while sitting, before the taslim.

Source: Sunan an-Nasa'i 1223 | The Book of Forgetfulness (In Prayer)

Context & Explanation

This hadith describes an incident where the Prophet Muhammad (ﷺ) mistakenly stood up to perform the third rak'ah when he should have remained seated for the final tashahhud in a four-rak'ah prayer. This occurred due to divine forgetfulness (sahw) permitted to the Prophet to serve as guidance for his ummah.

The Prophet's action demonstrates that when one forgets and stands up instead of sitting for the final tashahhud in a four-rak'ah prayer, they should not return to sitting but should complete the additional rak'ah, then perform the prostrations of forgetfulness before the taslim.

Legal Ruling (Hukm)

This incident establishes the ruling for what is known as "Sajdah al-Sahw" (Prostration of Forgetfulness). When a worshipper adds an unnecessary standing position in prayer, they must compensate by performing two prostrations before concluding the prayer with taslim.

The prostrations are performed while sitting, as explicitly mentioned in the hadith. This ruling applies to both obligatory and voluntary prayers.

Scholarly Commentary

Imam al-Nawawi comments that this hadith proves the validity of prostration for forgetfulness and specifies its timing before taslim in cases of addition to the prayer. The Prophet's mistake was by divine design to teach the ummah how to correct prayer errors.

Ibn Hajar al-Asqalani explains that the Prophet's forgetfulness was not due to negligence but was divinely ordained to establish comprehensive legislation for all situations worshippers might encounter in their prayers.

Practical Application

If a person stands up for a third rak'ah when they should have remained seated for the final tashahhud in a four-rak'ah prayer, they should complete that additional rak'ah, then perform two prostrations of forgetfulness while sitting before giving the final salutation.

The prayer remains valid and complete through this compensation, and the worshipper need not repeat the prayer unless other major invalidating factors are present.