Skip to main content
Dar Ahlullah Quran Academy

what to do if you make a mistake in prayer

What to Do If You Make a Mistake in Prayer (Sujood as-Sahw)

Dar Ahlullah team 18 min read

What to do if you make a mistake in prayer — sujood as-sahw, the prostration of forgetfulness, and whether it comes before or after the salam

Table of Contents

Introduction: The Half-Second You Realise

You are standing in the third rak’ah — or is it the fourth? — and the certainty you had ten seconds ago has quietly evaporated. Or you have just sat down for the final tashahhud and realised you never sat for the first one. Or you said the salam, turned your head, and something at the back of your mind says that was only three.

What happens next is where most people go wrong, and it is rarely a fiqh problem. It is a panic problem. The two instinctive reactions — abandon the prayer and start again, or ignore it and hope — are both worse than the correction the Sunnah actually prescribes, which is short, specific, and designed precisely for this.

This guide sets out what to do if you make a mistake in prayer: which mistakes require the prostration of forgetfulness (sujood as-sahw), which require you to add a rak’ah, which require nothing at all, and whether the correction goes before or after the salam. It is written for someone learning salah in English rather than inheriting it, so nothing is assumed — but it is useful to anyone who has ever finished a prayer unsure whether it counted.

One thing to be clear about at the outset. We teach Quran, Arabic and the practical fiqh of worship; we are not a fatwa body. Where the schools of law differ we say so and point you to scholars, rather than flattening a real difference into a single confident sentence. If you are still building the prayer itself, the companion piece to this one is our step-by-step guide to learning prayer in Islam, and the wider sequence a new Muslim works through is mapped in our first 90 days in Islam guide.

The Short Answer: Three Triggers, Two Timings

If you have two minutes rather than twenty, this is the entire system.

  1. Do not restart the prayer. Almost nothing that goes wrong in salah requires you to begin again. Restarting is the single most common overcorrection, and it usually turns a two-prostration repair into a fifteen-minute one.
  2. Three things trigger sujood as-sahw: adding something to the prayer, omitting something from it, or being genuinely uncertain about what you did. Everything else — a wandering mind, an itch, a mispronounced vowel — is not in this category at all.
  3. Omission and unresolved doubt are repaired before the salam. You do the two prostrations at the end of the final tashahhud, then say the salam.
  4. Addition, and doubt you have resolved on the balance of probability, are repaired after the salam. You finish the prayer normally, then do the two prostrations, then say the salam again.
  5. A missed pillar is not repaired by prostration. If you left out a rak’ah, a ruku’, a prostration or al-Fatihah, something has to be made up before the prostrations are of any use. That distinction is the one worth learning properly, and it is covered below.

That is the framework used by the majority of scholars. The Hanafi school orders things differently, and we set out that difference in its own section rather than burying it.

Forgetting in Prayer Was Anticipated, Not Overlooked

It helps enormously to know that none of this is an embarrassing edge case bolted on afterwards. The correction exists because the Prophet ﷺ himself made mistakes in prayer in front of his companions, and the corrections were preserved as law.

In one of the best-known incidents, narrated in Sahih al-Bukhari 482, he prayed two rak’ahs of a four-rak’ah prayer and said the salam. A companion known as Dhul-Yadayn asked whether the prayer had been shortened or whether he had forgotten. He confirmed with the others, stood, completed what was missing, said the salam, and then prostrated twice. In another, recorded in Sahih al-Bukhari 795 from ‘Abdullah ibn Buhaynah, he stood up after the second rak’ah without sitting for the first tashahhud, continued, and prostrated twice before the salam at the end.

The Qur’an frames the same thing as a mercy rather than a loophole. The closing verse of Surah al-Baqarah is a supplication that Allah not take His servants to account for forgetting or erring — Qur’an 2:286 — and the reports above are, in a practical sense, the answer to it.

The consequence for you is worth stating plainly: a prayer with a mistake in it, corrected properly, is a complete prayer. It is not a lesser one. There is no residue of deficiency to worry about afterwards.

Not Every Mistake Is the Same Kind of Mistake

The reason people find this confusing is that they treat “a mistake in prayer” as one thing. It is three, and the repair is different for each.

Decision chart for what to do if you make a mistake in prayer: added something to the prayer means sujood as-sahw after the salam, omitted an obligation or unresolved doubt means sujood as-sahw before the salam, a missed pillar means making up the rak'ah, and a missed sunnah means no correction is needed
Four categories of mistake, four different repairs. Applying the wrong one is what makes people restart prayers unnecessarily.

Pillars (arkan) — the prayer does not stand without them

Standing when able, the opening takbir, al-Fatihah, ruku’, rising from it, the two prostrations, the sitting between them, the final tashahhud, the salam. If one of these is genuinely left out, prostration alone does not repair it. The rak’ah — or the act — has to be made up, and the prostrations come afterwards as well. This is why “just do sujood as-sahw” is bad advice when the thing missed was al-Fatihah.

Obligations (wajibat) — the prayer stands, but a repair is owed

In the Hanbali framing this includes things like the first tashahhud and the prescribed remembrances in ruku’ and prostration. Leave one out by mistake and the prayer is valid; you owe two prostrations. The Ibn Buhaynah narration above is the model case.

Sunnahs — nothing is owed

Raising the hands at the takbir, the opening supplication, the extra du’a before the salam. Forget them and there is nothing to repair. Some scholars consider the prostration permissible here; none consider it required.

Everything that is not an act of prayer at all

Losing concentration, being distracted by a child, hearing your phone. These are not mistakes in the technical sense and generate no obligation whatsoever, however unsatisfying that feels.

The Three Things That Call for Sujood as-Sahw

Islam Question & Answer sets these out as three, and it is the cleanest available summary of the majority position — see their treatment of the reasons for sujood as-sahw.

1. Addition

An extra rak’ah, an extra ruku’, an extra prostration, an extra sitting. You did more than the prayer contains. The evidence is the report of the Prophet ﷺ praying five rak’ahs of Dhuhr and, on being told, prostrating twice — Sahih Muslim 572a.

2. Omission

An obligation left out, most commonly the first tashahhud. You did less than the prayer contains, but not so much less that a pillar went missing.

3. Doubt

You do not know what you did. This is the most common of the three in practice and the one people handle worst, because the instinct is to freeze and re-run the whole prayer mentally while still standing in it. The instruction is the opposite: resolve it by rule, immediately, and keep moving. The rule is given in Sahih Muslim 571a — discard the doubt, build on what you are certain of, complete the prayer, and prostrate twice before the salam.

Note what “build on what you are certain of” means in practice. If you cannot decide between three and four, you are certain of three. You treat it as three, pray another rak’ah, and correct at the end. You never round up on a guess.

Before the Salam or After It

This is the part everyone half-remembers. The majority rule, as stated in Islam Q&A on when to offer sujud as-sahw, has a satisfying internal logic once you see it.

  • Before the salam when you omitted an obligation, and when you were in doubt with neither option more likely. The prayer was short of something, so the repair happens while you are still inside it.
  • After the salam when you added something, and when you were in doubt but one option was clearly more likely. The prayer already had a surplus, so the repair sits outside it.

Two practical notes. First, if you get the timing wrong — you prostrate after the salam when it should have been before — the overwhelming scholarly position is that the prayer is still valid. The timing is a matter of what is better, not a condition of validity. Second, if a prayer contains two separate reasons for sujood as-sahw, you do not do four prostrations. Two prostrations cover the prayer.

How to Actually Perform Sujood as-Sahw

The mechanics are simpler than the rules that decide when to do them. There is no separate wudu, no new intention spoken aloud, no special formula that must be memorised in Arabic first.

Before the salam

  1. Complete the final tashahhud as normal, including the prayers upon the Prophet ﷺ.
  2. Say Allahu akbar and go down into prostration.
  3. Prostrate as you normally do, saying what you normally say in prostration.
  4. Say Allahu akbar, sit up briefly, then Allahu akbar and prostrate a second time.
  5. Sit up, then say the salam to the right and to the left as usual.

After the salam

  1. Finish the prayer completely, salam included.
  2. Immediately — before leaving your place or breaking off — say Allahu akbar and perform the same two prostrations.
  3. Say the salam again.

If you do not yet have the words of prostration secure in Arabic, that is a gap worth closing before it becomes a source of anxiety mid-prayer; our guide to the prayer takes them one at a time.

Twelve Situations, Answered

These are the cases people actually ask about, in roughly the order they come up.

1. You forgot the first tashahhud and are already standing

Do not sit back down. Continue the prayer as it now is, and prostrate twice before the salam at the end. This is the exact situation in Sahih al-Bukhari 795.

2. You realise before you have fully straightened up

Sit back down and recite the tashahhud. Scholars differ on whether prostrations are still owed in this case; the widely taught safe course is to do them before the salam and not worry further. Islam Q&A discusses the case at length in what to do if you miss the first tashahhud.

3. You prayed an extra rak’ah and only noticed at the end

Your prayer is valid. Prostrate twice after the salam. This is precisely the five-rak’ah Dhuhr narration in Sahih Muslim 572a.

4. You realise mid-rak’ah that this one is extra

Sit down as soon as you realise, recite the tashahhud if you have not, say the salam, then prostrate twice. You do not continue the extra rak’ah to completion just because you started it.

5. You said the salam a rak’ah or two early

Stand back up, pray what is missing, and complete the prayer — then prostrate twice after the salam. This is the Dhul-Yadayn incident in Sahih al-Bukhari 482, and notably the Prophet ﷺ had spoken in between, which did not invalidate the correction.

6. You genuinely cannot remember whether that was three or four

Build on the lesser number. Treat it as three, pray a fourth, and prostrate twice before the salam — Sahih Muslim 571a. Do this without a long internal audit; the deliberation itself is what wrecks the rest of the prayer.

7. You are unsure, but one answer feels clearly more likely

Act on the stronger probability, complete the prayer, and prostrate twice after the salam. This is the second half of the majority rule, and it exists so that a person who is 90% sure is not forced into the machinery designed for a person who has no idea.

8. You missed a pillar — ruku’, a prostration, or al-Fatihah

This is the case where prostration alone is not enough. Broadly, if you can still return to the missed act within the same rak’ah, you do; if you have already reached the same point in the following rak’ah, that following rak’ah replaces the defective one and you add a rak’ah at the end. Either way the two prostrations follow. The rulings here branch more than the others, and Islam Q&A works through them in omitting obligatory parts through forgetfulness. If it happens to you and you are unsure, ask an imam rather than guessing — this is the one category where guessing can cost you the rak’ah.

9. You said the right words in the wrong place

Reciting the tashahhud in a standing position, or Qur’an in prostration, and then catching yourself. The prayer is valid. Prostrations here are widely held to be recommended rather than required, and no scholar requires you to restart.

10. You mispronounced a word or recited the wrong verse

Ordinary slips of the tongue do not require sujood as-sahw and do not invalidate anything. Correct yourself and carry on. The exception scholars discuss is a mistake in al-Fatihah severe enough to change the meaning, which is a reason to fix the recitation outside prayer rather than to panic inside it. If your recitation is the thing making you nervous, that is a training issue with a straightforward fix — see our guide to tajweed rules for beginners.

11. You forgot the sujood as-sahw itself

If you remember while still sitting in your place, do it. If you have got up and left, or a long interval has passed, the prayer stands and there is nothing to repeat. Islam Q&A covers the case in forgetting a prostration of forgetfulness.

12. Mid-prayer you doubt whether your wudu is still valid

This is a different rule and people mix the two up constantly. Doubt does not undo certainty: if you are certain you had wudu and merely doubt whether something broke it, you continue and your prayer is valid. Sujood as-sahw has nothing to do with it. Our complete guide to wudu sets out what actually nullifies it, which is the knowledge that makes the doubt stop recurring.

Mistakes That Need No Correction at All

Half the value of learning this properly is knowing when to do nothing. None of the following requires sujood as-sahw:

  • Your mind wandered, even for most of the prayer.
  • You forgot the opening supplication, or forgot to raise your hands at a takbir.
  • You recited a shorter surah than you intended, or a different one.
  • You lost your place in a long surah and moved to a different one.
  • You made an involuntary movement — scratching, adjusting clothing, steadying a child leaning on you.
  • You are unsure afterwards, once the prayer is over and a good while has passed, whether everything was right. Certainty about a completed act is not overturned by later doubt.

That last one deserves emphasis, because a specific pattern — repeating prayers over and over because of doubts that will not settle — is a well-recognised difficulty, and the fiqh answer to it is deliberately firm: act on your first judgement and do not repeat. If doubts of that kind are dominating your worship, that is worth raising with a knowledgeable imam, not something to solve alone with more repetition.

Why You Will Hear Two Different Answers

You will, sooner or later, be told something that contradicts the timing rule above by someone equally confident. Usually there is no contradiction; there are two schools.

The Hanafi position is that sujood as-sahw is performed after the salam in all cases, not sorted into before and after by the type of mistake. The praying person says the salam, performs the two prostrations, then recites the tashahhud and says the salam again. Islamweb sets out the school’s procedure, quoting al-Kasani, in its fatwa on sujood as-sahw according to the Hanafi school. The Shafi’i and Hanbali schools prefer it before the salam, with the Hanbali school applying the detailed before/after split described earlier.

What this means for you is practical rather than academic. If you follow a school, follow it. If you do not, follow the practice of the community and imam you actually pray behind, learn the reasoning behind one position properly rather than collecting fragments of all of them, and do not treat a difference between qualified scholars as evidence that someone is praying wrongly. The consequence of picking the “other” valid opinion is not an invalid prayer. This is exactly the terrain our introduction to fiqh for beginners is meant to make navigable.

When You Are Praying Behind an Imam

In congregation the rules simplify sharply, because you are not the one running the prayer.

If the imam makes a mistake and performs sujood as-sahw, you follow him — before the salam or after it, whichever he does. You do not make your own judgement about whether it was warranted. If the imam makes a clear error, the congregation alerts him: men by saying subhan Allah, women by clapping the hands. That is a correction mechanism built into the prayer itself, and using it is not an interruption.

If you make a mistake while following, your own error is generally carried by the imam and you owe nothing. The exception is the latecomer. If you joined after the prayer began and are completing missed rak’ahs alone after the imam has finished, you are praying independently for that portion — and if the imam performs sujood as-sahw after the salam while you still have rak’ahs to make up, you do not join him in it; you stand, complete your prayer, and perform the prostrations yourself at the end. Islam Q&A addresses this case directly in when to offer sujud as-sahw if you are following an imam.

The Real Fix Is Usually Upstream

Almost everyone who searches for this is dealing with one of two underlying situations, and neither is really about the prostration.

The first is a prayer that was learned in fragments — a step from one relative, a video for another part, the words picked up phonetically without ever being read. A prayer assembled that way has soft edges everywhere, and mistakes cluster at the joins: the first tashahhud, the transitions, the rak’ah count in the four-rak’ah prayers. The number of corrections you need drops sharply once the prayer is learned as one continuous, ordered thing rather than as a set of remembered pieces.

The second is doubt that comes from not being able to read what you are saying. If the words of salah are stored as sound rather than as text, there is no anchor to check against, and uncertainty tends to spread from the recitation to the count to the whole prayer. The remedy is unglamorous and reliable: learn to read the Arabic script, even slowly, so that the prayer stops being an act of recall and starts being an act of reading. Our guide to reading the Quran as a beginner is the entry point for that, and it is the single change that most reduces mid-prayer anxiety for adult learners.

There is also a third, quieter case: someone who knows all of this and still cannot stop checking. If that is you, the useful move is not more study. It is to speak to an imam about the pattern itself.

How We Teach This

At Dar Ahlullah this material sits inside the practical worship track rather than being treated as an advanced topic, because a learner who cannot repair a mistake will eventually start avoiding prayers they are unsure about. Lessons are one-to-one and live over Zoom with a certified mentor, which matters here more than it does for most subjects: correcting a prayer is something you have to be watched doing. A mentor sees the moment you hesitate over the rak’ah count, and that is not information a worksheet or a recording can produce.

You can start with a free 30-minute assessment — no credit card, no obligation — where a mentor works out where the prayer is actually shaky and what to teach first. Beyond that, our rate is about $9 per teaching hour, with monthly plans at $36, $70 and $102 and a 20% discount for siblings. You can pause, upgrade or switch plans at any time, and if the pairing is not right we will rematch you with another certified mentor at no extra cost. The full breakdown is on our pricing page.

Where a question is genuinely a matter of fatwa rather than instruction — an unusual case, or something that touches on whether a past prayer needs repeating — our mentors will tell you so and point you to a scholar rather than improvise a ruling. That boundary is deliberate.

Questions People Ask

Does a mistake invalidate my prayer?

In the large majority of cases, no. Additions, omissions of obligations and doubt are all repairable, and the prayer that results is complete. The narrow category that does affect validity is a missing pillar left unrepaired — a rak’ah never made up, al-Fatihah never recited. Even then the remedy is to make it up, not to conclude the prayer was worthless.

Should I just start the prayer again to be safe?

No, and it is worth resisting the instinct hard. The Sunnah provides a correction precisely so that you do not restart. Habitual restarting also tends to escalate — the second attempt is more anxious than the first, and the third more than the second.

What if I only realise after I have left the mosque?

If the interval is long and you have moved on, the prayer stands as prayed. If you left out a whole rak’ah and realise very shortly afterwards, the situation is different and is worth putting to an imam, because it depends on how much time has passed and what invalidating actions occurred in between.

Do I need a separate intention for sujood as-sahw?

No. There is no spoken intention and no separate formula to learn. It is two prostrations, done the way you already prostrate, with the takbir before each.

Is there a tashahhud after sujood as-sahw?

If the prostrations come before the salam, you have already recited the final tashahhud and simply say the salam after them. If they come after the salam, practice differs between the schools; the Hanafi procedure includes reciting the tashahhud again before the final salam. Follow the practice you were taught rather than mixing the two.

I am a new Muslim and cannot keep track of the rak’ahs. Is that normal?

Entirely. Rak’ah counting stabilises with repetition, not with effort, and it usually settles within the first few months. Until it does, use the rule rather than your memory: when unsure, build on the lower number and correct at the end. It is a system designed for exactly your situation.

Can I do sujood as-sahw in a sunnah or nafl prayer?

Yes. The prostration of forgetfulness is not restricted to obligatory prayers.

My imam made a mistake and did not correct it. Was our prayer valid?

Alert him at the time if you can — that is what the subhan Allah convention is for. If it passed unaddressed, do not carry it afterwards; the congregation follows the imam, and the responsibility for the imam’s prayer is his. If it recurs, raise it with him privately outside the prayer.

Conclusion: A Repaired Prayer Is a Valid Prayer

The thing to take from all of this is the ordering. Identify which of the four categories the mistake falls into — pillar, obligation, sunnah, or not-a-mistake-at-all — and the repair follows almost mechanically. Pillars get made up. Obligations get two prostrations. Sunnahs get nothing. Distraction gets nothing.

Learn that and the anxiety mostly disappears, which is the real point. The Prophet ﷺ made mistakes in prayer in front of the people who would go on to teach the religion, and the corrections were preserved rather than quietly edited out. A worship built for humans has to account for forgetting, and this one does.

If you have been avoiding a prayer, or repeating one, because you were not sure it counted — it almost certainly did. Learn the repair once, and it stops being a question.

Related articles

what invalidates salah

What Invalidates Salah: The Things That Really Break Your Prayer

Four things end a prayer: a precondition falls away, something foreign is added, a structural part is deliberately dropped, or the intention is withdrawn. Almost everything else people restart prayers over is on neither that list nor close to it.

19 min read

how to pray tahajjud

How to Pray Tahajjud: The Night Prayer, Step by Step

Tahajjud is voluntary, prayed in pairs between Isha and Fajr and closed with Witr. When the window opens, how many rak'ahs, what to recite when you know only short surahs, and what the Sunnah does on the nights you sleep through it.

21 min read

how to pray Jumuah

How to Pray Jumu'ah: The Friday Prayer, Start to Finish

Jumu'ah replaces Dhuhr, not adds to it: two rak'ahs, a khutbah you sit silent through, and a congregation. Who it is owed by, what still counts if you walk in late, and what to do when the sermon is in a language you do not speak.

18 min read