Sujud Sahw: What the Prophet ﷺ Did When He Forgot in Salah
Contents
You stand up when you should have sat. You say the salam and someone whispers that you prayed three, not four. You lose count halfway through Isha. It happens to everyone, and it happened to the Prophet ﷺ too. Sujud sahw (often searched as sajda sahw) is the two extra prostrations he made when he forgot something in salah, and the hadith below show exactly what he did.
At a glance
- Hadith: 4 authentic narrations, plus 2 linked
- Collections: Sahih al-Bukhari and Sahih Muslim
- Grade: Sahih (all from Bukhari or Muslim)
- Topic: What the Prophet ﷺ did when he forgot or was unsure in salah
- Do today: Learn the four situations below so a slip in salah does not leave you confused
What is sujud sahw?
Sahw means forgetfulness or oversight. Sujud sahw is two prostrations made at the end of the prayer, while sitting, to make up for a slip: leaving something out, adding something by mistake, or being unsure what was done. The Sunnah shows the Prophet ﷺ doing it in different situations, sometimes before the salam and sometimes after it.
Below are four narrations from Bukhari and Muslim, each showing a different kind of forgetting. Read them as what the Prophet ﷺ did and taught; for the details of your own case, ask a qualified local scholar.
1. He missed the first tashahhud
‘Abdullah ibn Buhaynah (may Allah be pleased with him) reported:
صَلَّى لَنَا رَسُولُ اللَّهِ صلى الله عليه وسلم رَكْعَتَيْنِ مِنْ بَعْضِ الصَّلَوَاتِ ثُمَّ قَامَ فَلَمْ يَجْلِسْ، فَقَامَ النَّاسُ مَعَهُ، فَلَمَّا قَضَى صَلاَتَهُ وَنَظَرْنَا تَسْلِيمَهُ كَبَّرَ قَبْلَ التَّسْلِيمِ فَسَجَدَ سَجْدَتَيْنِ وَهُوَ جَالِسٌ ثُمَّ سَلَّمَ
Allah’s Messenger ﷺ once led us in a prayer and offered two rak‘ahs, then got up (for the third rak‘ah) without sitting (after the second). The people got up with him. When he was about to finish his prayer and we were waiting for his taslim, he said takbir before the taslim and performed two prostrations while sitting, then he ended the prayer with taslim.
Bukhari 1224 · Narrated by ‘Abdullah ibn Buhaynah · Translation adapted from Sunnah.com
The Prophet ﷺ stood up after the second rak‘ah instead of sitting for the first tashahhud, and the people stood with him. He did not go back. At the end, before the salam, he made two prostrations while sitting. HadeethEnc (hadith 3089) explains that these two prostrations made up for the tashahhud he had missed.
Try this: notice how the people simply followed the imam. If an imam stands up by mistake, the Companions’ example here was to stay with him, not to break away.
2. He ended the prayer too early
Abu Hurairah (may Allah be pleased with him) reported:
صَلَّى النَّبِيُّ صلى الله عليه وسلم إِحْدَى صَلاَتَىِ الْعَشِيِّ ـ قَالَ مُحَمَّدٌ وَأَكْثَرُ ظَنِّي الْعَصْرَ ـ رَكْعَتَيْنِ ثُمَّ سَلَّمَ ثُمَّ قَامَ إِلَى خَشَبَةٍ فِي مُقَدَّمِ الْمَسْجِدِ فَوَضَعَ يَدَهُ عَلَيْهَا وَفِيهِمْ أَبُو بَكْرٍ وَعُمَرُ ـ رضى الله عنهما ـ فَهَابَا أَنْ يُكَلِّمَاهُ وَخَرَجَ سَرَعَانُ النَّاسِ فَقَالُوا أَقَصُرَتِ الصَّلاَةُ وَرَجُلٌ يَدْعُوهُ النَّبِيُّ صلى الله عليه وسلم ذُو الْيَدَيْنِ فَقَالَ أَنَسِيتَ أَمْ قَصُرَتْ فَقَالَ لَمْ أَنْسَ وَلَمْ تُقْصَرْ. قَالَ بَلَى قَدْ نَسِيتَ. فَصَلَّى رَكْعَتَيْنِ ثُمَّ سَلَّمَ ثُمَّ كَبَّرَ فَسَجَدَ مِثْلَ سُجُودِهِ أَوْ أَطْوَلَ، ثُمَّ رَفَعَ رَأْسَهُ فَكَبَّرَ، ثُمَّ وَضَعَ رَأْسَهُ فَكَبَّرَ فَسَجَدَ مِثْلَ سُجُودِهِ أَوْ أَطْوَلَ، ثُمَّ رَفَعَ رَأْسَهُ وَكَبَّرَ
The Prophet ﷺ led one of the evening prayers (the sub-narrator Muhammad said, “I think it was most probably ‘Asr”) and finished it with taslim after only two rak‘ahs. Then he stood by a piece of wood at the front of the mosque and put his hand on it. Abu Bakr and ‘Umar were among the people, but they were too much in awe of him to speak to him, and the people in a hurry went out saying, “Has the prayer been shortened?” A man whom the Prophet ﷺ called Dhul-Yadayn said, “Have you forgotten, or has the prayer been shortened?” He said, “I have not forgotten, and it has not been shortened.” He said, “Yes, you have certainly forgotten.” So he prayed two rak‘ahs, gave the taslim, then said takbir and prostrated like his usual prostration or longer, then raised his head and said takbir, then put his head down, said takbir and prostrated like his usual prostration or longer, then raised his head and said takbir.
Bukhari 1229 · Narrated by Abu Hurairah · Translation adapted from Sunnah.com
This is the well-known story of Dhul-Yadayn. The Prophet ﷺ was sure he had prayed the full prayer, so he checked with the people before acting. Then he completed the two missing rak‘ahs, gave the salam, and only after that made the two prostrations. HadeethEnc (hadith 4853) notes that he forgot as any human does, and through it Allah taught the rulings of forgetfulness in prayer.
In another narration he prayed five rak‘ahs of Zuhr instead of four. When he was told, he made two prostrations after the salam (Bukhari 1226).
Try this: if someone tells you after salah that you missed a rak‘ah, don’t brush it off. The Prophet ﷺ listened, checked, and put it right.
3. When you are unsure how many rak‘ahs you prayed
Abu Sa‘id al-Khudri (may Allah be pleased with him) reported that the Messenger of Allah ﷺ said:
إِذَا شَكَّ أَحَدُكُمْ فِي صَلاَتِهِ فَلَمْ يَدْرِ كَمْ صَلَّى ثَلاَثًا أَمْ أَرْبَعًا فَلْيَطْرَحِ الشَّكَّ وَلْيَبْنِ عَلَى مَا اسْتَيْقَنَ ثُمَّ يَسْجُدُ سَجْدَتَيْنِ قَبْلَ أَنْ يُسَلِّمَ فَإِنْ كَانَ صَلَّى خَمْسًا شَفَعْنَ لَهُ صَلاَتَهُ وَإِنْ كَانَ صَلَّى إِتْمَامًا لأَرْبَعٍ كَانَتَا تَرْغِيمًا لِلشَّيْطَانِ
“When any one of you is in doubt about his prayer and does not know how much he has prayed, three or four (rak‘ahs), he should cast aside his doubt and build on what he is sure of, then perform two prostrations before giving the salutation. If he has prayed five rak‘ahs, they will make his prayer an even number for him, and if he has prayed exactly four, they will be a humiliation for the devil.”
Muslim 571a · Narrated by Abu Sa‘id al-Khudri · Translation adapted from Sunnah.com
Doubt about the count is the most common slip of all. The instruction is clear: drop the doubt and build on what you are certain of. If you are torn between three and four, you are sure of three, so you pray one more. HadeethEnc (hadith 11231) explains that the lesser number is the certain one. Then come two prostrations before the salam, and either way the devil loses.
Try this: the next time you lose count, don’t restart the whole prayer in frustration. Take the lower number, complete it, and make the two prostrations.
4. “I forget as you forget”
‘Abdullah ibn Mas‘ud (may Allah be pleased with him) reported that the Prophet ﷺ led a prayer and was told afterwards that something had been different. He prostrated twice, gave the salam, then turned to the people and said:
إِنَّهُ لَوْ حَدَثَ فِي الصَّلاَةِ شَىْءٌ لَنَبَّأْتُكُمْ بِهِ، وَلَكِنْ إِنَّمَا أَنَا بَشَرٌ مِثْلُكُمْ، أَنْسَى كَمَا تَنْسَوْنَ، فَإِذَا نَسِيتُ فَذَكِّرُونِي، وَإِذَا شَكَّ أَحَدُكُمْ فِي صَلاَتِهِ فَلْيَتَحَرَّى الصَّوَابَ، فَلْيُتِمَّ عَلَيْهِ ثُمَّ يُسَلِّمْ، ثُمَّ يَسْجُدْ سَجْدَتَيْنِ
“If anything had changed in the prayer, I would have told you. But I am a human being like you, and I forget as you forget. So when I forget, remind me. And if any of you is in doubt about his prayer, let him aim for what is correct, complete his prayer on that basis, then give the taslim, then perform two prostrations.”
Bukhari 401 · Narrated by ‘Abdullah ibn Mas‘ud · Translation adapted from Sunnah.com
Muslim reports the same words (Muslim 572a). Two lessons stand out. The Prophet ﷺ asked to be reminded when he forgot, so correcting an imam gently is part of the Sunnah. And when certainty is not possible, the one praying aims for what is most likely correct and completes the prayer on that basis.
Try this: if you pray behind an imam who makes a slip, remind him the way the Companions did, calmly and without making a scene.
Before or after the salam: where scholars differ
These narrations show both. In the hadith of Ibn Buhaynah and Abu Sa‘id, the prostrations came before the salam. In the hadith of Dhul-Yadayn, the five rak‘ahs of Zuhr, and Ibn Mas‘ud’s hadith above, they came after it.
Scholars have worked out how to put these narrations together, and they reached different views on when the prostrations should come before the salam and when after. We don’t give a ruling here. Follow what your imam or a qualified local scholar teaches, and know that each way has a hadith behind it.
Bringing it together
Reflection: it is a mercy that these slips happened to the Prophet ﷺ himself. If he had never forgotten, every missed sitting and every lost count would feel like a ruined prayer. Instead, his own forgetting became the lesson: stay calm, take what you are sure of, complete the prayer, and let two prostrations repair the rest. Salah was never meant to be a test of perfect memory. It is a meeting with Allah that He made easy to put right.
Questions people ask
What is sajda sahw?
Sajda sahw (sujud sahw) means the “prostrations of forgetfulness”: two prostrations made at the end of the prayer, while sitting, after a slip such as missing the first tashahhud, praying too few or too many rak‘ahs, or being unsure of the count. The hadith above show the Prophet ﷺ doing it.
Is sujud sahw done before or after the salam?
The hadith show both. The Prophet ﷺ prostrated before the salam when he missed the first tashahhud (Bukhari 1224) and taught it for doubt about the count (Muslim 571a); he prostrated after the salam when he had ended the prayer too early (Bukhari 1229) or prayed five rak‘ahs (Bukhari 1226). Scholars differ on how to apply these, so follow a qualified local scholar.
What should I do if I am unsure whether I prayed three or four rak‘ahs?
The Prophet ﷺ said to cast aside the doubt and build on what you are sure of, which is the lower number, then make two prostrations before the salam (Muslim 571a).
Did the Prophet ﷺ really forget in salah?
Yes. He said, “I am a human being like you, and I forget as you forget. So when I forget, remind me” (Bukhari 401). His forgetting showed the ummah what to do when it happens to them.
Key lessons

- Sujud sahw is two prostrations at the end of the prayer to repair a slip.
- The Prophet ﷺ made them before the salam when he missed the first tashahhud.
- He made them after the salam when he had ended the prayer early or added a rak‘ah.
- When unsure of the count, build on what you are certain of: the lower number.
- Forgetting is human. He asked to be reminded, so remind your imam gently.
Part of our Salah series: see all our salah articles in one place.
May Allah accept our prayers with all their gaps, and make us among those who stand before Him with humble hearts.
Save this to Pinterest so you know what to do when you forget in salah

Share the reward. Send this article to someone who needs it today — teaching a hadith or dua can become a lasting good deed for you, in shaa Allah.






