Allah's Messenger (ﷺ) said, "When anyone of you stands for the prayers, Satan comes and puts him in doubts till he forgets how many rak`at he has prayed. So if this happens to anyone of you, he should perform two prostrations of Sahu while sitting.
Forgetfulness in Prayer - Sahih al-Bukhari 1232
Allah's Messenger (ﷺ) said, "When anyone of you stands for the prayers, Satan comes and puts him in doubts till he forgets how many rak`at he has prayed. So if this happens to anyone of you, he should perform two prostrations of Sahu while sitting."
Commentary on the Hadith
This noble hadith from Sahih al-Bukhari addresses the common human experience of forgetfulness during prayer, which is attributed to Satan's whisperings. The Prophet (ﷺ) acknowledges this spiritual reality and provides a practical solution through the prostrations of forgetfulness (Sujud al-Sahu).
The wisdom behind this teaching demonstrates Allah's mercy in His legislation, as He does not burden worshippers with perfection in remembrance but rather provides remedies for human shortcomings. The two prostrations serve as compensation for deficiencies that may occur in prayer due to Satan's interference.
Scholars explain that these prostrations are performed at the end of the prayer before the Tasleem (salutation), and they consist of two prostrations with the Takbir (saying "Allahu Akbar") for each prostration and rising. This act rectifies any inadvertent errors and completes the prayer's validity.
Legal Rulings Derived
The prostrations of forgetfulness are wajib (obligatory) according to the majority of scholars when certain conditions occur, including doubt about the number of rak'ahs performed.
If one cannot recall whether they prayed three or four rak'ahs, they should base their action on what they are more certain of (usually the lesser number) and then perform the prostrations of forgetfulness.
This ruling applies to both obligatory and voluntary prayers, demonstrating the comprehensive nature of this divine concession for human weakness in worship.