It is also possible that his words, “until he has completed it,” mean: until he has completed the prayer. The example corresponding to this possibility is a man who, after giving the salām at the end of the prayer, remembers that he prayed five rak'ahs. According to this understanding, his words, “he prostrates,” mean: after the salām.
Thus, if he adds a rak'ah and does not realize it until he has completed it, he must perform the prostration of forgetfulness. But if he realizes before giving the salām, should he prostrate before the salām or after it?
The answer is that he prostrates after the salām: he completes the tashahhud and gives the salām, then performs two prostrations and gives the salām again.
The evidence for this is:
-
When the Messenger of Allah, may Allah’s peace and blessings be upon him, prayed five rak'ahs and they informed him after the salām, he drew his legs in, prostrated, and gave the salām. He said: “If one of you is uncertain, let him seek what is correct, then complete his prayer accordingly.” (1) He did not say, “If he realizes before the salām, then let him prostrate before the salām.” Since he prostrated after the salām and did not indicate that the proper place for prostration due to this addition is before the salām, it is known that prostration for an addition is performed after the salām.
-
The hadith of Dhu al-Yadayn: “The Prophet, may Allah’s peace and blessings be upon him, gave the salām after two rak'ahs. Then they reminded him, so he completed the prayer and gave the salām. He then performed two prostrations and gave the salām.” (2) This prostration was due to the additional salām during the prayer. It was not, as some people imagine, prostration for an omission because he gave the salām before completing the prayer, for the Prophet, may Allah’s peace and blessings be upon him, completed what remained.