The Book of Forgetfulness (In Prayer)
كتاب السهو
Chapter 24: The praying person completing (the prayer) upon what he remembers when he doubts
The Prophet (ﷺ) said: "If one of you is not sure about his prayer, let him forget about what he is unsure of and complete his prayer on the basis of what he is sure of. When he is sure that he has completed it, let him prostrate twice while he is sitting. Then if he has prayed five (rak'ahs), they (the two prostrations) will make his prayer even-numbered, and if he had prayed four, they will annoy and humiliate the shaitan."
The Prophet (ﷺ) said: "If one of you does not know whether he prayed three or four (rak'ahs), let him pray a rak'ah then prostrate twice after that when he is sitting. Then if he prayed five (rak'ahs), they (the two prostrations) will make his prayer even-numbered, and if he had prayed four, they will annoy and humiliate the shaitan."
Chapter 25: Estimating (what is most likely the case)
"If one of you is not sure about his prayer, let him estimate what he thinks is most likely to be correct and complete the prayer on that basis, then let him prostrate twice."
"The Messenger of Allah (ﷺ) said: 'If one of you is not sure about his prayer, let him estimate and prostrate twice after he has finished."
"The Messenger of Allah (ﷺ) prayed and did more or less (rak'ahs). When he had said the taslim, it was said: 'O Messenger of Allah, has there been some change concerning the prayer?' He said: 'If there had been some change concerning the prayer, I would have told you. Rather I am a human being and I forget as you forget. If any one of you is not sure about his prayer, let him consider an estimate of what is correct, and complete his prayer on that basis, then say the taslim and prostrate twice.'"
"The Messenger of Allah (ﷺ) prayed and did more or less (rak'ahs). When he had said the salam we said: 'O Messenger of Allah (ﷺ), has there been some change concerning the prayer?' He said: 'Why are you asking?' So we told him what he had done. He turned back toward the Qiblah and prostrated two prostrations of forgetfulness, then he turned to face us and said: 'If there had been some change concerning the prayer I would have told you.' Then he said: 'Rather I am a human being and I forget as you forget. If any one of you is not sure about his prayer, let him estimate what he thinks is correct, and complete his prayer on that basis, then say the taslim and prostrate two prostrations of forgetfulness.'"
The Messenger of Allah (ﷺ) prayed Zuhr then he turned to face them and they said: 'Has there been some change concerning the prayer?' He said: 'Why are you asking?' They told him what he had done, so he turned back toward the Qiblah and prostrated twice. Then he said the salam and turned to face them and said: 'I am only human, I forget as you forget, so if I forget, then remind me.' And he said: 'If there had been some change concerning the prayer I would have told you.' And he said: 'If one of you is not sure about his prayer, let him estimate what is closest to what is correct, then let him complete it on that basis, then prostrate twice.'
"Whoever us not sure about his prayer, then let him estimate what is correct, then let him prostrate twice after he finished his prayer, while he is sitting."
"Whoever has doubt, or is not sure, let him estimate what is correct, then let him prostrate twice."
"They used to say: 'If one is not sure of what he estimates is correct, then prostrate twice.'"
"The Messenger of Allah (ﷺ) said: 'Whoever has doubt during his prayer, let him prostrate twice after he has said the taslim'".
The Messenger of Allah (ﷺ) said: "Whoever has doubt during his prayer, let him prostrate twice after he said the taslim."
The Messenger of Allah (ﷺ) said: "Whoever has doubt during his prayer, let him prostrate twice after he said the taslim."
The Messenger of Allah (ﷺ) said: "Whoever has doubt during his prayer, let him prostrate twice." (One of the narrators) Hajjaj said: "After he has said the taslim." (Another of them) Rawh said: "While he is sitting."
The Messenger of Allah (ﷺ) said: "When any one of you gets up and prays, the Shaitan comes to him an confuses him until he does not know how many (Rak'ahs) he prayed. If any one of you notices that, let him prostrate twice when he is sitting."
"The Messenger of Allah (ﷺ) said: 'When the call to prayer is given, the Shaitan runs away breaking wind loudly. When the Tathwb (Iqamah) is completed, he comes back and whispers to a man in his hear, until he does not know how many (rak'ahs) he has prayed. If any one of you notices that, let him prostrate twice.'"
Chapter 26: What a person should do if he prays five (rak'ahs)
"The Prophet(ﷺ) prayed Zuhr with five rak'ahs, and it was said to him: 'Has something been added to the prayer?' He said: 'Why are you asking?' They said: 'You prayed five.' So he turned around and prostrated twice."
The Prophet (ﷺ) led them in praying Zuhr with five (rak'ahs). They said: 'You prayed five.' So he prostrated twice after he had said the taslim, while he was sitting.
"Alqamah prayed five (rak'ahs) and was told about that. He said: 'Did I really do that?' I nodded yes. He said: 'What about you, O odd-eyed one?' I said: 'Yes'. So he prostrated twice, then he narrated to us from 'Abdullah that the Prophet (ﷺ) prayed five (rak'ahs), and the people whispered to one another, then they said to him: 'Has something been added the prayer?' He said: 'No.' So they told him, and he turned around and prostrated twice, then he said: 'I am only human; I forget as you forget.'"
"I heard Ash-Sha'bi say: 'Alqamah bin Qais forgot (and made a mistake) in his prayer, and they told him about that after he had spoken, He said: 'Is that true, O odd-eyed one?' He said: 'Yes.' So he undid his cloak, then he performed two prostrations of forgtfulness,and said: 'This is what the Messenger of Allah (ﷺ) did.' He said: And I heard Al-Hakam say: 'Alqamah had prayed five.'"