Prayer After Committing a Sin
Every servant of Allah sins. What separates one sinner from another is what happens next: despair, delay and carrying on as if nothing happened — or an immediate return to Allah. For that return, the Prophet Muhammad ﷺ taught a short, concrete response, and he attached to it a promise that leaves no room for despair: make ablution well, stand and pray two rak’ahs, and ask Allah’s pardon — and Allah pardons. The teaching comes to us from Abu Bakr as-Siddiq, the closest of all people to the Prophet ﷺ, carried by Ali ibn Abi Talib, who received it with a care that itself teaches us how seriously he took it. It is recorded in Sunan Abu Dawud, where it is graded Sahih, and in Jami’ al-Tirmidhi, where it is graded Hasan. And when the Prophet ﷺ finished teaching it, he did not leave it standing alone: he recited the verse of the Quran that describes exactly these people — Surah Aal-e-Imran, verse 135. This article sets out the narration in both of its routes, word for word, and then walks through each step it contains.
1. A teaching carried with unusual care
Most hadiths reach us through a chain of narrators, and this one announces its own carefulness before it even begins. Ali explained how he used to receive narrations. When he heard a tradition directly from the Messenger of Allah ﷺ, he took whatever benefit Allah willed for him from it. But when the narration came to him through another Companion, he did not accept it casually:
“when some one of his companions narrated a tradition to me I adjured him. When he took an oath, I testified him.” (Sunan Abu Dawud 1521 — Sahih)
Tirmidhi’s route preserves the same habit in its own words:
“When a man among his Companions narrated to me I ask him to swear an oath to me about it, and when he swears an oath to me I trust him.” (Jami’ al-Tirmidhi 406 — Hasan)
Then Ali names the man who narrated this particular teaching to him — and the name is itself a guarantee:
“AbuBakr narrated to me a tradition, and AbuBakr narrated truthfully.” (Sunan Abu Dawud 1521 — Sahih)
“And Abu Bakr narrated to me – and Abu Bakr told the truth -“ (Jami’ al-Tirmidhi 406 — Hasan)
Consider what this framing gives the reader. The teaching was not picked up in passing. It was spoken by the Prophet ﷺ, heard by Abu Bakr — as-Siddiq, the Truthful — passed by him to Ali, and received by Ali under the strictest personal rule he applied to anything he had not heard with his own ears: an oath first, then acceptance. A narration about returning to Allah after sin was itself carried back with repentance-like seriousness at every step. That is the door through which the teaching enters, and it is worth pausing at before the teaching itself.
2. The teaching in Abu Dawud’s narration
Here is the Prophet’s ﷺ saying as Abu Dawud records it, complete and in its own sequence:
“When a servant (of Allah) commits a sin, and he performs ablution well, and then stands and prays two rak’ahs, and asks pardon of Allah, Allah pardons him.” (Sunan Abu Dawud 1521 — Sahih)
The narration is built as a sequence, and every part of the sequence matters. It begins with the sin itself — stated plainly, without softening: a servant of Allah commits a sin. It does not describe a special category of sinner or a special size of sin; it describes the ordinary door through which every human being passes. Then come three actions, joined one to the next: he performs ablution well; then he stands and prays two rak’ahs; and he asks pardon of Allah. Then, with no condition added and no waiting period imposed, comes the result: Allah pardons him.
Notice also what the sequence does not contain. There is no instruction to announce the sin to anyone, no intermediary to approach, no penance to purchase, and no delay — nothing that says the door opens only after a season of punishment. The movement is entirely between the servant and his Lord: wash, stand, pray, ask — and the pardon is Allah’s own act, stated in the narration as the direct outcome of the asking. The whole shape of the teaching is the shape of repentance (tawbah) itself: turn back to Allah with the body and the heart together, and turn back now.
3. The same teaching in Tirmidhi’s narration
Tirmidhi records the same event through the same chain — Asma’ ibn al-Hakam, from Ali, from Abu Bakr — and grades the narration Hasan. Its wording of the Prophet’s ﷺ saying runs like this:
“There is no man who commits a sin, then makes Wudu, then performs Salat, then seeks forgiveness from Allah, except that Allah forgives him.” (Jami’ al-Tirmidhi 406 — Hasan)
The two routes agree on the substance completely: a sin, then purification, then prayer, then seeking forgiveness, then Allah’s forgiveness. But each wording keeps its own details, and they should be read as they stand rather than blended into one. Abu Dawud’s wording says the servant “performs ablution well” and “prays two rak’ahs” — it names the number. Tirmidhi’s wording says the man “makes Wudu” and “performs Salat” — it does not specify a number of rak’ahs in the sentence itself, and it phrases the promise as an exception that swallows the whole sentence: there is no man who does these things except that Allah forgives him. Abu Dawud’s promise is a plain statement — “Allah pardons him”; Tirmidhi’s is an emphatic exclusion — no one who comes this way is left out.
Having both routes is a strength, not a difficulty. The practice is confirmed twice over, through the same Companion from the same source, and the reader can see exactly which details each wording carries. For the one who wants to act on the teaching, Abu Dawud’s route supplies the precise form — ablution done well and two rak’ahs — while Tirmidhi’s route supplies the sweeping assurance that the promise has no exceptions for the one who seeks forgiveness.
4. Step one: he performs ablution well
The first movement after the sin is not speech but washing. In Abu Dawud’s wording, the servant:
“performs ablution well” (Sunan Abu Dawud 1521 — Sahih)
The word “well” belongs to the narration, and it is worth honouring: this is not a hurried splash of water but the ablution performed properly and completely, the same wudu a believer makes before any prayer — on its method, see the complete guide to wudu. There is a fittingness in where the return begins. Before the servant says a word about his sin, he washes the limbs with which he acts, stands outwardly purified before he asks to be inwardly purified, and puts himself in the state in which a Muslim always approaches Allah in prayer. The sin happened in heedlessness; the ablution is the first deliberate act of attention.
Tirmidhi’s wording keeps the same step in its shorter form — the man “makes Wudu” — and moves directly to the prayer. Both routes, then, place purification before prayer and prayer before the asking, and neither route allows the asking to float free of the actions that frame it.
5. Step two: he stands and prays two rak’ahs
The second movement is prayer — standing before Allah rather than only thinking about Him. Abu Dawud’s wording fixes the measure of it:
“and then stands and prays two rak’ahs” (Sunan Abu Dawud 1521 — Sahih)
Two rak’ahs: the smallest complete unit of voluntary prayer, deliberately light. The teaching does not set the returning sinner a long night of prayer as the price of being heard; it sets him the briefest prayer there is, so that nothing about the response is heavy except the sincerity inside it. What fills those two rak’ahs is the same prayer a Muslim always prays — standing, bowing and prostrating before Allah — now performed with a specific burden carried into it: a sin to be forgiven, and a Lord who has promised to forgive it.
Here the two wordings should again be left exactly as they are. Abu Dawud’s route says two rak’ahs. Tirmidhi’s route says the man “performs Salat” without counting. The one acting on the teaching follows the narration that counts — two rak’ahs — and the one reading both sees that the prayer itself, in whichever wording, is the bridge between the washing and the asking: the body washed, the body stood in prayer, and then the tongue and heart ask.
6. Step three: he asks pardon of Allah
Only after the ablution and the prayer does the narration arrive at the asking — and the asking is the hinge on which the whole promise turns:
“and asks pardon of Allah, Allah pardons him.” (Sunan Abu Dawud 1521 — Sahih)
Seeking forgiveness — istighfar — is the heart of the sequence, and the prayer before it is its preparation, not its replacement. The servant does not merely feel regret in silence; he asks, and the One he asks is named: Allah. The breadth of what is promised to those who seek Allah’s forgiveness is gathered in our guide to the benefits and duas of istighfar, and the words a person can use are collected among the duas for seeking forgiveness — at their head the chief of all prayers for forgiveness, Sayyid al-Istighfar. The narration itself does not prescribe a formula here; it prescribes the act: ask pardon of Allah. And it answers the asking with the shortest possible distance between request and result — he asks pardon, and Allah pardons.
7. The verse the Prophet ﷺ recited after teaching it
The narration does not end with the promise. Abu Dawud’s route continues: he then recited this verse — and quotes the verse’s opening words as the Prophet ﷺ recited them:
“And those who, when they commit indecency or wrong their souls, remember Allah” (Sunan Abu Dawud 1521 — Sahih)
Tirmidhi’s route records the same moment and notes that the recitation ran “until the end of the Ayah”:
“Those who when they have committed Fahishah or wronged themselves… remember Allah.” (Jami’ al-Tirmidhi 406 — Hasan)
This is the verse itself, Surah Aal-e-Imran 135:
وَٱلَّذِينَ إِذَا فَعَلُوا۟ فَـٰحِشَةً أَوْ ظَلَمُوٓا۟ أَنفُسَهُمْ ذَكَرُوا۟ ٱللَّهَ فَٱسْتَغْفَرُوا۟ لِذُنُوبِهِمْ وَمَن يَغْفِرُ ٱلذُّنُوبَ إِلَّا ٱللَّهُ وَلَمْ يُصِرُّوا۟ عَلَىٰ مَا فَعَلُوا۟ وَهُمْ يَعْلَمُونَ
“those who, when they happen to commit a shameful act or wrong themselves, remember Allah, then, seek forgiveness for their sins” (Quran 3:135)
The verse is a portrait of the very people the hadith is about, drawn by Allah Himself. It begins where the hadith begins — a shameful act committed, a soul wronged by its own deed. But the first thing said of these people is not the sin; it is what they do with the memory of it: they remember Allah. The sin does not make them forget Him; it drives them back to remembering Him. And remembrance flows straight into the asking: they “seek forgiveness for their sins”. The hadith’s sequence — sin, then the turning, then the asking — is the verse’s sequence too, which is exactly why the Prophet ﷺ recited it on this occasion: the Quran itself had already described the people who take this path.
Then the verse asks its question, and the question is the ground of all hope in this matter:
“who is there to forgive sins except Allah?” (Quran 3:135)
No one else forgives sins. That is why the hadith’s servant asks Allah and no one else, why no intermediary appears anywhere in the sequence, and why the promise can be stated so absolutely in both narrations: the One being asked is the only One who can grant what is asked.
8. The verse’s own boundary: they do not persist
The portrait has a final stroke, and it draws the line between the returning sinner and the careless one:
“do not persist in what they have done, knowingly” (Quran 3:135)
The people described in the verse are not people who never fall; the verse itself opens with their fall. They are people who, having fallen, do not settle into the sin, do not carry on in it with open eyes, and do not treat the prayer of repentance as a licence to return to the same deed on schedule. Their mark is the opposite of persistence: remembrance, seeking forgiveness, and a refusal to knowingly continue. This is the verse’s own completion of the hadith. The two rak’ahs and the istighfar are the door back; not persisting is what it means to have actually walked through it. A person who prays the two rak’ahs while fully intending to repeat the sin the next day has the motions of the portrait without its meaning — the verse he recites describes someone else. Read together, hadith and verse give both halves of the truth: the door is wide open, and it is a door, meant to be passed through, not stood in.
9. Putting it together: the response, step by step
Gathered from the two narrations and the verse, the response to a sin is short enough to act on the moment it is needed:
1. Remember Allah. The verse begins there: the sin is the occasion for remembrance, not for forgetting. 2. Perform ablution well. Wash properly and completely, as Abu Dawud’s wording specifies, and approach Allah in the state of purity. 3. Stand and pray two rak’ahs. The brief prayer Abu Dawud’s narration names — the servant standing before his Lord with his sin on his heart. 4. Ask pardon of Allah. Seek His forgiveness directly, as the narration commands and as both routes promise He answers. 5. Do not persist. Leave the sin and do not knowingly continue in it — the verse’s closing description of the people it praises.
And the outcome, in the hadith’s own words, is not uncertain. Abu Dawud: he “asks pardon of Allah, Allah pardons him.” Tirmidhi: “There is no man who commits a sin, then makes Wudu, then performs Salat, then seeks forgiveness from Allah, except that Allah forgives him.” A sin is a terrible thing, but despair after a sin is a second error the texts never ask of anyone. What they ask is a washing, a standing, an asking — and a Lord who forgives.
Frequently Asked Questions
Q1: What should a person do after committing a sin, according to this hadith? According to Abu Bakr’s narration in Sunan Abu Dawud, the servant should perform ablution well, then stand and pray two rak’ahs, and then ask pardon of Allah — upon which the narration states the result directly: Allah pardons him (Sunan Abu Dawud 1521 — Sahih).
Q2: How many rak’ahs are prayed — is it always two? Abu Dawud’s wording names the number: the servant “prays two rak’ahs”. Tirmidhi’s wording of the same teaching says the man “performs Salat” without specifying a number in that sentence (Jami’ al-Tirmidhi 406 — Hasan). The practice taken from the narrations is the two rak’ahs Abu Dawud specifies, with both routes agreeing on the sequence of ablution, prayer and seeking forgiveness.
Q3: Which verse did the Prophet ﷺ recite after teaching this? He recited verse 135 of Surah Aal-e-Imran — “And those who, when they commit indecency or wrong their souls, remember Allah” — and Tirmidhi’s route notes that he recited it until the end of the verse. The verse describes those who remember Allah after a shameful act, seek forgiveness for their sins, and do not persist in what they have done, knowingly.
Q4: Who can forgive the sin — does the person need anyone between him and Allah? No. The verse itself asks, “who is there to forgive sins except Allah?” In both narrations the servant asks Allah directly, and Allah’s pardon is the direct result. No intermediary, announcement or penance appears anywhere in the teaching.
Q5: Through whom did this hadith reach us? Abu Bakr as-Siddiq heard it from the Prophet ﷺ and narrated it to Ali ibn Abi Talib, who — by his own stated rule for narrations he had not heard directly — took it from Abu Bakr under oath and testified to it; Asma’ ibn al-Hakam then narrated it from Ali. It is recorded in Sunan Abu Dawud (graded Sahih) and in Jami’ al-Tirmidhi (graded Hasan).
