Topic #16: Ruling regarding Sujood ul-sahw (sajdah sahu or prostration of forgetfulness).
The prostration of forgetfulness (sujood ul-sahw) is required whenever one inadvertently adds extraneous parts or misses parts or is in doubt regarding parts of the arkaan (essential pillars) of the prayer and/or its other requirements.
When one doubts after performing salaam: One should disregard such doubt. For example, take the case of one who has completed praying dhuhr then questions after finishing the prayer, "Did I really pray four raka’aat or only three?" Such doubt should be disregarded completely unless it is substantiated by clear and certain indications; otherwise, it opens the door to waswasah (the whispering of Satan) and unwarranted extraneous additions to the prayer.
When one doubts while performing salah: If a person falls into doubt as to whether he prayed, e.g., three of four raka‘at, he should consider the most likely case. However, if he cannot put more weight to one of the two, he should assume what he is certain of and that is lesser amount, and make the prostrations of forgetfulness (sujood ul-sahw). The evidence is the hadith narrated by Abu Sa‘eed Al-Khudri (may Allah be please with him), who said:
The Prophet (peace be upon him) said: If one of you has doubts during his prayer and he does not recall how many rak‘at he has prayed, whether three or four, then he can put an end to his doubt by praying according to what he was certain of (the lesser amount) and then making two sujood before the salaam. If it turns out that he had prayed five raka‘at, the two sujood would make it even. Whereas if he ended up completing his four raka‘at , they would be in defiance of the Satan. (Sahih Muslim, No. 571)
The prostration of forgetfulness only applies to those parts of the prayer that are obligatory, and doesn't apply to mistakes in the voluntary or recommended acts of the prayer.
You should perform two prostrations for forgetfulness; prostrating and sitting between the two prostrations, just as you would in the regular prayer. Finally, conclude the prayer with the tasleem, by saying: assalaamu 'alaykum warahmatullaah to the right, then to the left.
There are two different times of the prostration:
1) Before the tasleem (to be performed if one omits something in the salah): In this case, the prostration is peformed immediately after concluding the final tashahhud, and before saying assalaamu 'alaykum warahmatullaah. The only extra actions are the two prostrations themselves - everything else is completely normal.
2) After the tasleem (to be performed if one does something extra in salah): In this case, the prayer is completed normally, and immediately after the prayer, two extra prostrations are performed, as well as an additional tasleem. When the prostrations are done like this, the tasleem is performed twice: once to end the prayer, and once to end the set of prostrations. The tashahhud (sitting while reciting Attahiyat and all), however, is only performed once, and isn't repeated.
Note that when following an imām in prayer, you must follow his prostrations of forgetfulness, even if you didn't make a mistake. On the other hand, if you make a mistake in the prayer that you pray behind the imām, then there is no need to prostrate, as his prayer makes up for the mistake that you made. If, however, you make a mistake in a part of the prayer in which you are not following him, the normal rules for mistakes apply.
And Allah knows best!