حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا اللَّيْثُ، عَنِ ابْنِ شِهَابٍ، عَنِ الأَعْرَجِ، عَنْ عَبْدِ اللَّهِ ابْنِ بُحَيْنَةَ الأَسَدِيِّ، حَلِيفِ بَنِي عَبْدِ الْمُطَّلِبِ أَنَّ النَّبِيَّ صلى الله عليه وسلم قَامَ فِي صَلاَةِ الظُّهْرِ وَعَلَيْهِ جُلُوسٌ فَلَمَّا أَتَمَّ صَلاَتَهُ سَجَدَ سَجْدَتَيْنِ يُكَبِّرُ فِي كُلِّ سَجْدَةٍ وَهُوَ جَالِسٌ قَبْلَ أَنْ يُسَلِّمَ وَسَجَدَهُمَا النَّاسُ مَعَهُ مَكَانَ مَا نَسِيَ مِنَ الْجُلُوسِ ‏.‏ قَالَ وَفِي الْبَابِ عَنْ عَبْدِ الرَّحْمَنِ بْنِ عَوْفٍ ‏.‏
Translation
There is a narrated with another chain that Abu Hurairah and ['Abdullah bin] As-Sa'id Al-Qari' would perform the prostrations of As-Sahw before the Taslim.Abu 'Eisa said

Ahmad and Ishaq said: "When a man stands up after two Rak'ah, then he performs the prostrations for As-Sahw before the Salam according to the Hadith of Ibn Buhainah."

'Abdullah bin Buhainah is 'Abdullah bin Malik [so he is] Ibn Buhainah (because) Malik is his father and Buhainah is his mother.

I was informed of this by Ishaq bin Mansur from 'Ali [bin 'Abdullah] bin Al-Madini.

Abu 'Eisa said: The people of knowledge differ over when a man is to perform the prostrations of As-Sahw, is it before the Salam or after it. Some of them thought that her performs them after the Salam. This is the view of Sufyan Ath-Thawri and the people of Al-Kufah. Some of them said he performs them before the Salam. This is the view of most of the Fuqaha among the people of Al-Madinah, like Yahya bin Sa'eed, Rabi'ah, and others. This is also the saying of Ash-Shafi'i.

Some of them said when he adds to the Salat, then it is after the Salam, and when he leaves something out, then before the Salam. This is the view of Malik bin Anas.

Ahmad said: "Whatever is reported from the Prophet (ﷺ) about the prostrations from As-Sahw then it is acted upon in either case." He saw that when one stands after Rak'ah then according to the Hadith of Ibn Buhainah, he is to perform the prostrations before the Salam. When he prays five for Zuhr, then performs the prostrations after the Salam, and if he says Salam after two Rak'ahs of Zuhr or 'Asr then he performs the prostrations after the Salam. All of them are to be acted upon depending upon the case, and in the cases where nothing is reported from the Prophet (ﷺ), then two prostrations are performed for As-Sahw before the Salam.

Ishaq said the same as Ahmad about all of this, with the exception that he said that for every case of As-Sahw that is not mentioned from the Prophet (ﷺ), then if it is an addition to the Salat, then prostrations are performed after the Salam, and if it is something that was left out, then the prostrations are performed before the Salam.

Comment

The Book on Salat (Prayer)

Jami' at-Tirmidhi - Hadith Reference: Jami` at-Tirmidhi 391

Scholarly Commentary on Prostrations of Forgetfulness

The noble hadith from Abdullah bin Buhainah establishes that when one mistakenly stands after two rak'ah instead of sitting for tashahhud, the prostrations of sahw are performed before the final salam. This demonstrates the Prophet's methodology in rectifying prayer errors.

The classical scholars differed regarding the timing of sahw prostrations. The Madinan school, including Imam Malik and Imam Shafi'i, generally preferred performing them before salam, while the Kufan school under Imam Thawri recommended after salam. Imam Ahmad and Ishaq bin Rahawayh adopted a comprehensive approach, following each specific prophetic precedent in its respective case.

Imam Malik distinguished between omissions and additions: prostrations before salam for what was omitted, after salam for what was added. This nuanced understanding reflects the depth of classical scholarship in deriving rulings from multiple authentic traditions.

The wisdom behind these differences lies in the various circumstances of forgetfulness during prayer. The scholars' consensus remains that prostrations of forgetfulness rectify minor errors and preserve the validity of the prayer, demonstrating the mercy and practicality of Islamic legislation.