Entering and Leaving the Mosque: The Duas in Their Own Prints

بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ
Dua & Azkar · Entering & Leaving the Mosque

Entering and Leaving the Mosque — Each Narration’s Own Words

Ask for the dua of the mosque door and one long script comes back — refuge, basmala, blessing, mercy, bounty and ‘forgive me my sins’ stirred into a single breath, as if one narration said it all. No narration does. The pieces stand in four different prints, with three different records, and one of them travels on a print graded Da’if. This page prints each narration’s own words, and lets the joins be seen as joins.

Short answer: Two short wordings, both in one narration: entering — ‘Allahumma-ftah li abwaba rahmatik’; leaving — ‘Allahumma inni as’aluka min fadlik’ (Muslim 713). Abu Dawud’s prints add what Muslim’s does not carry: the blessing on the Prophet ﷺ before the entering words (465), and a refuge wording before them (466). The field merges all of it into one script.

ImanAtlas does not give fatwas. For your own situation, ask a qualified scholar you trust.

Every day, at every mosque door, these are among the most-said words in Islam — and among the most quietly edited. The wordings themselves are short. What has grown long is the script built around them: a composite that dua apps, posters and social posts hand back as ‘the’ dua for entering the mosque. This page goes back to the prints. Four narrations carry the pieces; each is printed whole below, in its own block, with its own grade beside it, and nothing is carried from one block into another.

The two wordings in one narration

Muslim gives the words a chapter of their own — ‘What to say when entering the masjid’ — in his Book of Prayer – Travellers. His narration is the anchor of this page because it is the shortest complete account: entering and leaving together, in a single report from Abu Usayd, with nothing standing before the words. No basmala. No blessing. No refuge. The two clauses below are the whole of what the narration asks the one entering to say, and the whole of what it asks the one leaving to say.

اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ

Allahumma-ftah li abwaba rahmatik

اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ

Allahumma inni as’aluka min fadlik

“Abu Usaid reported that the Messenger of Allah (ﷺ) said: When any one of you enters the mosque, he should say:" O Allah! open for me the doors of Thy mercy" ; and when he steps out he should say: ‘O Allah! I beg of Thee Thy Grace." (Imam Muslim said: I heard Yahya saying: I transcribed this hadith from the compilation of Sulaiman b. Bilal.)”

Sahih Muslim 713a · The Book of Prayer – Travellers, chapter “What to say when entering the masjid” · in-book Book 6, Hadith 82 · narrated by Abu Usayd — Muslim’s chain also names Abu Humayd, and his own note on the chain stands inside the translation above · both wordings stand in this ONE narration, in this order: no basmala, no blessing and no refuge stand before them in this print · Muslim prints no grade for his own book, and none is given here · sunnah.com prints no transliteration for this narration: the two lines above are derivations, each checked word for word against its own clause of the Arabic

Muslim’s own tail to the narration is worth noticing, because it is about the chain, not the words. Inside the translation above he records that he heard Yahya say he had transcribed the hadith from Sulaiman ibn Bilal’s compilation, and that it reached him that Yahya al-Himmani gives the chain with ‘and Abu Usayd’ where his own print hesitates between Abu Humayd and Abu Usayd. The hesitation is printed, not resolved — the words themselves are not in dispute in any print on this page.

The print that adds the blessing

Abu Dawud prints the same narration in his chapter ‘What A Person Should Say When He Enters The Masjid’ — by the same route, through Rabi‘a and ‘Abd al-Malik, from Abu Humayd or Abu Usayd. The two wordings in his print are the same words as Muslim’s, letter for letter. What his print adds stands before them: «فَلْيُسَلِّمْ عَلَى النَّبِيِّ صلى الله عليه وسلم ثُمَّ لْيَقُلِ» — ‘he should invoke blessing on the Prophet ﷺ, and then he should say’. The blessing is an instruction inside this narration. It is not a prefix the other prints carry, and this page does not lend it to them.

اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ

Allahumma-ftah li abwaba rahmatik

اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ

Allahumma inni as’aluka min fadlik

“Abu Usaid al-Ansari reported the Messenger of Allah (May peace be upon him) as saying: when any of you enters the mosque he should invoke blessing on the prophet (ﷺ) and then he should say: O Allah, open to me the gates of thy mercy. And when he goes out, he should say: O Allah, I ask thee out of Thine abundance.”

Sunan Abi Dawud 465 · Prayer (Kitab Al-Salat), chapter “What A Person Should Say When He Enters The Masjid” · in-book Book 2, Hadith 75 · the same Rabi‘a – ‘Abd al-Malik – Abu Humayd / Abu Usayd route as Muslim’s print — Grade: Sahih (Al-Albani), as printed at sunnah.com · the blessing instruction stands in this print’s Arabic and in the translation above, and in no other print on this page · the lines above are derivations checked against this print’s own Arabic — the entering clause’s line is not carried over from Muslim’s block, because in this print the clause does not stand alone: the blessing comes first, and the blessing carries no line

The refuge wording before the door

The refuge words stand in the very next narration of the same Abu Dawud chapter — their own report, with their own frame. Haiwah ibn Shuraih met ‘Uqbah ibn Muslim and put to him something that had reached him — «بَلَغَنِي», ‘it has been reported to me’ — and ‘Uqbah confirmed it and added the exchange that closes the narration, in which the devil speaks. That sentence is the narration’s, inside its block below; it is not a promise this page makes, and the wording is not a shield this page hands out. What the print gives is a wording and a report, and both stand here as printed.

أَعُوذُ بِاللَّهِ الْعَظِيمِ وَبِوَجْهِهِ الْكَرِيمِ وَسُلْطَانِهِ الْقَدِيمِ مِنَ الشَّيْطَانِ الرَّجِيمِ

A’udhu billahil-‘azim, wa biwajhihil-karim, wa sultanihil-qadim, minash-shaytanir-rajim

“Haiwah b. Shuraih reported : I met ‘Uqbah b. Muslim and said to him: it has been reported to me that someone has narrated to you from the prophet (ﷺ) that when he entered the mosque, he would say: I seek refuge in Allah, the Magnificent, and in His noble face, and in his eternal domain, from the accursed Devil. He asked : is it so much only? I said: Yes. He said: when anyone says so. The devil says: he is protected from me all the day long.”

Sunan Abi Dawud 466 · the same chapter as 465 · in-book Book 2, Hadith 76 · narrated by Haiwah ibn Shuraih, from ‘Uqbah ibn Muslim, from ‘Abdullah ibn ‘Amr ibn al-‘As — Grade: Sahih (Al-Albani), as printed at sunnah.com · the narration’s frame is a reported conversation, and the protection sentence inside it is the devil’s quoted words inside the narration — not a promise of this page · the line above is a derivation, checked word for word against the Arabic

The longer script, and where its extra line comes from

One more print completes the set — and explains the apps. Fatimah, the Prophet’s ﷺ daughter, reports a wording for both doors that is longer than any other on this page: each side opens with the basmala and a salam on the Messenger of Allah ﷺ, and each carries «اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي» — ‘O Allah, forgive me my sins’ — before the doors are mentioned. This is where the composite’s extra line comes from. It is also the print with the weakest record of the four: sunnah.com prints its grade as Da’if (Darussalam), and that grade stands beside its block below, exactly where a reader deciding what to carry to the door will see it.

بِسْمِ اللَّهِ وَالسَّلاَمُ عَلَى رَسُولِ اللَّهِ اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي وَافْتَحْ لِي أَبْوَابَ رَحْمَتِكَ

Bismillah, was-salamu ‘ala Rasulillah, Allahummagh-firli dhunubi waftah li abwaba rahmatika

بِسْمِ اللَّهِ وَالسَّلاَمُ عَلَى رَسُولِ اللَّهِ اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي وَافْتَحْ لِي أَبْوَابَ فَضْلِكَ

Bismillah, was-salamu ‘ala Rasulillah, Allahummagh-firli dhunubi waftah li abwaba fadlika

“It was narrated that Fatimah the daughter of the Messenger of Allah said: "Whenever the Messenger of Allah entered the mosque he would say: ‘Bismillah, was-salamu ‘ala Rasulillah, Allahummagh-firli dhunubi waftah li abwaba rahmatika. (In the Name of Allah, and peace be upon the Messenger of Allah. O Allah, forgive me my sins and open to me the gates of Your mercy).’ When he left he would say: ‘Bismillah, was-salamu ‘ala Rasulillah, Allahummagh-firli dhunubi waftah li abwaba fadlika. (In the Name of Allah, and peace be upon the Messenger of Allah. O Allah, forgive me my sins and open to me the gates of Your bounty).’”

Sunan Ibn Majah 771 · The Book On The Mosques And The Congregations, chapter “Supplication When Entering The Mosque” · in-book Book 4, Hadith 37 · narrated by Fatimah, daughter of the Messenger of Allah ﷺ — Grade: Da’if (Darussalam), as printed at sunnah.com · the two lines above are the romanisations printed inside this narration’s own translation at sunnah.com, where they also stand; as lines they are checked word for word against the Arabic

Set the four prints side by side and the familiar script explains itself. Refuge (466) + basmala and ‘forgive me my sins’ (771) + the blessing instruction (465) + the mercy and bounty wordings (713a, and again 465) — stirred into one breath, it reads as a single dua. It stands in no single narration. One dua blog prints the whole composite as one text, its brackets the only trace of the joins; a widely shared reel’s Arabic runs basmala, blessing and mercy wording together as the default text, attributed to nothing. This page takes the opposite course: four blocks, four records, and the joins left visible.

Beyond what these texts themselves say, this page adds nothing — no merged script, no order turned into an instruction, no count, and no ruling the sources do not give.

In Hisnul Muslim these words stand in two chapters of their own — chapter 13, on entering the mosque, and chapter 14, on leaving it. The book’s complete chapter index stands on this site as the Hisnul Muslim index, where both chapters are marked with what this library prints of them. The dua for the walk to the mosque itself — the dua of light, the book’s chapter 12 — stands on its own page: Going to the Mosque — the Dua of Light. This page stands under the hub page, Duas & Azkar, where the library’s duas are gathered.

ImanAtlas does not give fatwas. For your own situation, ask a qualified scholar you trust.

Frequently asked questions

Is ‘Allahumma-ftah li abwaba rahmatik’ in Sahih Muslim?

Yes. It stands in Sahih Muslim 713a, in the chapter Muslim himself heads ‘What to say when entering the masjid’. The same narration carries the leaving words too — ‘Allahumma inni as’aluka min fadlik’ — one narration, two wordings, printed whole in the first block of this page. Muslim prints no basmala, no blessing and no refuge before them.

What is the difference between Muslim 713 and Abu Dawud 465?

Almost nothing — and one thing. Both prints come by the same route (Rabi‘a, from ‘Abd al-Malik ibn Sa‘id, from Abu Humayd or Abu Usayd), and the two wordings themselves are the same words in both. The one difference is what Abu Dawud’s print puts before the entering words: the instruction to invoke blessing on the Prophet ﷺ first. That instruction stands in Abu Dawud 465 — graded Sahih (Al-Albani) — and in no other print on this page.

What is the refuge wording said before entering the mosque — and is it authentic?

It is a separate narration, Abu Dawud 466, in the same chapter as 465: ‘A’udhu billahil-‘azim, wa biwajhihil-karim, wa sultanihil-qadim, minash-shaytanir-rajim’ — ‘I seek refuge in Allah, the Magnificent, and in His noble face, and in his eternal domain, from the accursed Devil.’ Abu Dawud prints it graded Sahih (Al-Albani). No print on this page prefixes it to Muslim’s wordings; it stands in its own narration, with its own frame, and this page keeps it there.

Where does ‘Allahumma-ghfir li dhunubi’ — ‘forgive me my sins’ — in the entering dua come from?

From Fatimah’s narration in Sunan Ibn Majah 771. Her narration gives a different wording for both doors — each opening with the basmala and a salam on the Messenger of Allah ﷺ, and each carrying ‘forgive me my sins’ before the doors are mentioned. It is the longest of the four prints on this page, and it travels on the weakest record of the four: Ibn Majah’s page prints its grade as Da’if (Darussalam). The line is printed whole on this page, with that grade beside it — neither hidden nor borrowed into the other prints.

Why do dua apps print a longer entering dua than Muslim 713?

Because the longer text is assembled, not narrated. One widely shared version runs the refuge wording, a basmala, a blessing on the Prophet ﷺ, the mercy wording and ‘forgive me my sins’ together in a single breath — and each of those pieces comes from a different print on this page: the refuge from Abu Dawud 466, the blessing instruction from Abu Dawud 465, the mercy and bounty wordings from Muslim 713a, and ‘forgive me my sins’ with its basmala from Ibn Majah 771. The composite stands in none of the four narrations. The brackets some sites put around parts of it are the only trace of the joins.

Does Abu Dawud 466 reach the Prophet ﷺ directly?

Its own frame says otherwise, and the page shows the frame rather than tidying it away. Haiwah ibn Shuraih begins: ‘it has been reported to me’ — the Arabic is one word, «بَلَغَنِي» — that someone had narrated this from ‘Uqbah ibn Muslim, and he puts it to ‘Uqbah as a question: ‘is it so much only?’ The answer he receives, and the devil’s sentence that follows it, stand inside the narration block above, in the narration’s own words.

Which foot do you enter with — and do you say the words before or after stepping in?

Those are questions of practice, and this page answers neither. Which foot, in what order the pieces of the composite are to be said, whether the refuge wording belongs before or inside the door — the narrations on this page give wordings, not a choreography, and turning their order into an instruction is exactly what this page does not do. For practice, the line at the head of this page applies.

Share card — Entering and Leaving the Mosque: ‘Allahumma-ftah li abwaba rahmatik’ in Arabic — the entering words of Sahih Muslim 713a — with the four prints listed apart: Muslim 713a, Abu Dawud 465 and 466 (both Sahih (Al-Albani)) and Ibn Majah 771 (Da'if (Darussalam)); nothing on the card is merged into one script.
Entering and leaving the mosque at a glance — the entering words of Muslim 713a, and the four prints that carry the pieces, kept apart. Save it or share it.

Sources

Every wording and grade on this page comes from these pages, printed from this page’s own captures of their sources. The composite described in the text is field evidence gathered for this page’s research; no wording on this page is taken from it.

Found an error? We correct mistakes within 24 hours, with a note on the page — write to us through the website.