Dua for Entering the Mosque and Leaving It (Arabic, Transliteration and Meaning)

Dua for entering the mosque and leaving it, in Arabic, transliteration and meaning, with Imam al-Nawawi’s full recitation and the sunnah way to enter.

Worshippers walking towards the entrance of a mosque

This is a complete guide to the dua for entering the mosque and the dua for leaving the mosque, in Arabic, transliteration and meaning, together with how to enter and leave the mosque according to the sunnah.

The guide begins with the shortest wording from an authentic hadith. For those who want more, the full recitation arranged by Imam al-Nawawi is included as an optional practice. At the end are the dua for walking to the mosque and answers to common questions.

Dua for Entering the Mosque at a Glance

  • Entering: Allāhummaftaḥ lī abwāba raḥmatik, “O Allah, open for me the doors of Your mercy”.
  • Leaving: Allāhumma innī as’aluka min faḍlik, “O Allah, I ask You of Your bounty”.
  • Foot: step in with the right foot, step out with the left.
  • Ruling: sunnah. There is no sin in leaving it, but it is a loss to miss it.
  • After entering: pray two rak‘ahs of tahiyyat al-masjid before sitting down.

As you step in with your right foot, say this dua:

Dua for entering the mosque

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

Allāhummaftaḥ lī abwāba raḥmatik.

O Allah, open for me the doors of Your mercy.1

This is the shortest and most authentic wording. Imam al-Nawawi says that if the full recitation feels long, this wording narrated by Muslim is enough.2

Optional Practice: The Full Recitation for Entering

This section is sunnah, not obligatory. The short wording above is enough.

Imam al-Nawawi gathered several recitations from separate hadiths into one arrangement: isti‘adhah, bismillah, praise of Allah, blessings on the Prophet ﷺ, then the dua for forgiveness and mercy. Recite it when time allows.

Dua for entering the mosque (full recitation)

أَعُوذُ بِاللّٰهِ الْعَظِيمِ، وَبِوَجْهِهِ الْكَرِيمِ، وَسُلْطَانِهِ الْقَدِيمِ، مِنَ الشَّيْطَانِ الرَّجِيمِ. بِسْمِ اللّٰهِ، وَالْحَمْدُ لِلّٰهِ، اَللّٰهُمَّ صَلِّ عَلَى سَيِّدِنَا مُحَمَّدٍ وَعَلَى آلِ مُحَمَّدٍ وَسَلِّمْ، اَللّٰهُمَّ اغْفِرْ لِي ذُنُوبِي، وَافْتَحْ لِي أَبْوَابَ رَحْمَتِكَ

A‘ūdhu billāhil-‘aẓīm, wa biwajhihil-karīm, wa sulṭānihil-qadīm, minash-shaiṭānir-rajīm. Bismillāh, walḥamdu lillāh, Allāhumma ṣalli ‘alā sayyidinā Muḥammadiw wa ‘alā āli Muḥammadiw wa sallim. Allāhummaghfir lī dhunūbī waftaḥ lī abwāba raḥmatik.

I seek refuge in Allah the Almighty, in His Noble Face and His eternal authority, from the accursed Satan. In the name of Allah, and all praise is for Allah. O Allah, send blessings and peace upon our master Muhammad and upon the family of Muhammad. O Allah, forgive me my sins and open for me the doors of Your mercy.3

The isti‘adhah at the start of this recitation has a special virtue. Whoever says it on entering the mosque is protected from Satan for the rest of that day.4

When leaving, step out with your left foot and say this dua:

Dua for leaving the mosque

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

Allāhumma innī as’aluka min faḍlik.

O Allah, I ask You of Your bounty.5

Notice the difference. On entering, we ask for mercy, because the mosque is a place of worship. On leaving, we ask for bounty, that is, provision and good for the worldly affairs waiting outside.

Optional Practice: The Full Recitation for Leaving

This section is sunnah, not obligatory. The full recitation is the same as on entering, except that the last word changes from raḥmatik to faḍlik.

Dua for leaving the mosque (full recitation)

أَعُوذُ بِاللّٰهِ الْعَظِيمِ، وَبِوَجْهِهِ الْكَرِيمِ، وَسُلْطَانِهِ الْقَدِيمِ، مِنَ الشَّيْطَانِ الرَّجِيمِ. بِسْمِ اللّٰهِ، وَالْحَمْدُ لِلّٰهِ، اَللّٰهُمَّ صَلِّ عَلَى سَيِّدِنَا مُحَمَّدٍ وَعَلَى آلِ مُحَمَّدٍ وَسَلِّمْ، اَللّٰهُمَّ اغْفِرْ لِي ذُنُوبِي، وَافْتَحْ لِي أَبْوَابَ فَضْلِكَ

A‘ūdhu billāhil-‘aẓīm, wa biwajhihil-karīm, wa sulṭānihil-qadīm, minash-shaiṭānir-rajīm. Bismillāh, walḥamdu lillāh, Allāhumma ṣalli ‘alā sayyidinā Muḥammadiw wa ‘alā āli Muḥammadiw wa sallim. Allāhummaghfir lī dhunūbī waftaḥ lī abwāba faḍlik.

I seek refuge in Allah the Almighty, in His Noble Face and His eternal authority, from the accursed Satan. In the name of Allah, and all praise is for Allah. O Allah, send blessings and peace upon our master Muhammad and upon the family of Muhammad. O Allah, forgive me my sins and open for me the doors of Your bounty.

You may also add a dua for protection from Satan when leaving:

Dua for protection when leaving the mosque

اَللّٰهُمَّ اعْصِمْنِي مِنَ الشَّيْطَانِ الرَّجِيمِ

Allāhumma‘ṣimnī minash-shaiṭānir-rajīm.

O Allah, protect me from the accursed Satan.6

1

Step In with the Right Foot

When stepping into the mosque, put your right foot first. This is the sunnah for every honourable act, including entering the mosque.7

2

Send Blessings, Then Say the Dua for Entering

Send blessings on the Prophet ﷺ, then say the dua for entering the mosque:8

Dua for entering the mosque

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

Allāhummaftaḥ lī abwāba raḥmatik.

O Allah, open for me the doors of Your mercy.

For the full recitation, see the Optional Practice in the section on the dua for entering the mosque.

3

Pray Tahiyyat al-Masjid Before Sitting

Before sitting down, pray two rak‘ahs of tahiyyat al-masjid to honour the house of Allah.9

The full method, including the intention and what to do during the adhan or the Friday sermon, is in the guide to tahiyyat al-masjid.

Optional Practice: Intention for I‘tikaf

This section is sunnah, not obligatory.

While waiting for the prayer or a lesson, you may make the intention for i‘tikaf, that is, staying in the mosque with the intention of worshipping Allah. I‘tikaf counts when you stay for a while with that intention, as long as you are not merely passing through.10

Intention for i‘tikaf

نَوَيْتُ الْاِعْتِكَافَ فِي هٰذَا الْمَسْجِدِ سُنَّةً لِلّٰهِ تَعَالَى

Nawaitul-i‘tikāfa fī hādhal-masjidi sunnatan lillāhi ta‘ālā.

I intend i‘tikaf in this mosque, as a sunnah, for the sake of Allah the Exalted.

4

Fill Your Time with Worship

Use your time in the mosque for dhikr, reciting the Quran, making dua or listening to a lesson. The rest of the etiquette is in the section on etiquette inside the mosque.

5

Step Out with the Left Foot

When you are done, put your left foot first as you step out.

6

Say the Dua for Leaving the Mosque

Dua for leaving the mosque

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

Allāhumma innī as’aluka min faḍlik.

O Allah, I ask You of Your bounty.

To add more, the full recitation and the dua for protection on leaving are in the section on the dua for leaving the mosque.

The Prophet ﷺ said this dua as he went out for the Fajr prayer. Imam al-Nawawi recommends saying it while walking to the mosque.

Dua for walking to the mosque

اَللّٰهُمَّ اجْعَلْ فِي قَلْبِي نُورًا، وَفِي لِسَانِي نُورًا، وَاجْعَلْ فِي سَمْعِي نُورًا، وَاجْعَلْ فِي بَصَرِي نُورًا، وَاجْعَلْ مِنْ خَلْفِي نُورًا، وَمِنْ أَمَامِي نُورًا، وَاجْعَلْ مِنْ فَوْقِي نُورًا، وَمِنْ تَحْتِي نُورًا، اَللّٰهُمَّ أَعْطِنِي نُورًا

Allāhummaj‘al fī qalbī nūrā, wa fī lisānī nūrā, waj‘al fī sam‘ī nūrā, waj‘al fī baṣarī nūrā, waj‘al min khalfī nūrā, wa min amāmī nūrā, waj‘al min fauqī nūrā, wa min taḥtī nūrā. Allāhumma a‘ṭinī nūrā.

O Allah, place light in my heart and light on my tongue. Place light in my hearing and light in my sight. Place light behind me and before me. Place light above me and below me. O Allah, grant me light.11

Allah praises those who fill the mosques with remembrance and prayer:

فِي بُيُوتٍ أَذِنَ ٱللَّهُ أَن تُرۡفَعَ وَيُذۡكَرَ فِيهَا ٱسۡمُهُۥ يُسَبِّحُ لَهُۥ فِيهَا بِٱلۡغُدُوِّ وَٱلۡأٓصَالِ ٣٦

رِجَالٞ لَّا تُلۡهِيهِمۡ تِجَٰرَةٞ وَلَا بَيۡعٌ عَن ذِكۡرِ ٱللَّهِ وَإِقَامِ ٱلصَّلَوٰةِ وَإِيتَآءِ ٱلزَّكَوٰةِ يَخَافُونَ يَوۡمٗا تَتَقَلَّبُ فِيهِ ٱلۡقُلُوبُ وَٱلۡأَبۡصَٰرُ ٣٧

Meaning: “In houses which Allah has permitted to be raised and His name to be mentioned in them, He is glorified there morning and evening by men whom neither trade nor sale distracts from the remembrance of Allah, establishing prayer and giving zakah. They fear a Day when hearts and eyes will be overturned.” (Surah al-Nur, verses 36 to 37)

  • Pray tahiyyat al-masjid, two rak‘ahs before sitting down.
  • Fill your time with dhikr and the Quran, as praised in the verses above.
  • Mind your body and breath odour. The Prophet ﷺ forbade someone who had just eaten garlic from coming to the mosque, because the smell disturbs the congregation.12
  • Step out with the left foot and say the dua for leaving the mosque.
What is the shortest dua for entering the mosque?

Allāhummaftaḥ lī abwāba raḥmatik, “O Allah, open for me the doors of Your mercy”. It is narrated by Muslim and is enough on its own.

Some people say “Allāhummaghfir lī dhunūbī” before the dua for entering the mosque. Which is correct?

Both have a basis. The narration of Muslim does not mention ighfir lī dhunūbī. The narration of al-Tirmidhi from Fatimah RA has this addition, and al-Tirmidhi grades it hasan although its chain is not connected. Imam al-Nawawi includes the addition in his full arrangement.13

Which foot goes first when entering the mosque?

The right foot when entering, the left foot when leaving.

Is there an intention (niyyah) for entering the mosque?

There is no obligatory intention for entering the mosque. However, it is sunnah to make the intention for i‘tikaf if you plan to stay for a while, for example: Nawaitul-i‘tikāfa fī hādhal-masjidi sunnatan lillāhi ta‘ālā.

Is the dua for entering the mosque also said when entering a surau or prayer room?

This dua is taught specifically for the mosque, and an ordinary surau or prayer room is not a mosque in fiqh terms. I‘tikaf is also valid only in a mosque. There is no harm in reciting the dua as a general supplication when entering a surau, since it asks for Allah’s mercy, but do not treat it as a sunnah specific to the surau.14

What is the dua for entering Masjid al-Haram and the Prophet’s Mosque?

It is the same as for any other mosque. Imam al-Nawawi mentions this when explaining the etiquette of entering the Prophet’s Mosque.15

What is the dua for leaving the mosque?

Allāhumma innī as’aluka min faḍlik, “O Allah, I ask You of Your bounty”. Step out with the left foot first.

Conclusion

The dua for entering the mosque is only one line, but it changes the way we step in. We enter asking for mercy and leave asking for bounty. In between, the mosque becomes a place where the heart finds its calm again.

Start with the short wording until it becomes a habit. Once it comes easily, add the full recitation of Imam al-Nawawi.

May this be of benefit.

Footnotes & References

  1. Hadith of Abu Humayd or Abu Usayd RA. The Prophet ﷺ said: «إذا دخل أحدكم المسجد، فليقل: اللهم افتح لي أبواب رحمتك، وإذا خرج، فليقل: اللهم إني أسألك من فضلك». [Sahih Muslim, no. 713] [Sunan al-Nasa’i, no. 729] ↩︎
  2. Imam al-Nawawi mentions the full recitation for entering the mosque, then says: «فإن طال عليه هذا كله فليقتصر على ما في مسلم», that is, if all of this feels too long, the wording narrated by Muslim is enough. [al-Nawawi, al-Majmu‘, 2/179] ↩︎
  3. This arrangement is given by Imam al-Nawawi: «يستحب أن يقول عند دخوله المسجد أعوذ بالله العظيم وبوجهه الكريم وسلطانه القديم من الشيطان الرجيم باسم الله والحمد لله اللهم صل على سيدنا محمد وعلى آل محمد وسلم اللهم اغفر لي ذنوبي وافتح لي أبواب رحمتك». He explains that it is gathered from several hadiths, some in Sahih Muslim and most in the Sunan of Abu Dawud and al-Nasa’i. [al-Nawawi, al-Majmu‘, 2/179] [al-Nawawi, al-Adhkar, Chapter on What to Say When Entering and Leaving the Mosque] ↩︎
  4. Hadith of ‘Abdullah ibn ‘Amr ibn al-‘As RA. Whoever says this isti‘adhah on entering the mosque, Satan says: «حفظ مني سائر اليوم», that is, he is protected from me for the rest of the day. Imam al-Nawawi grades it hasan, narrated by Abu Dawud with a good chain. [Sunan Abi Dawud, no. 466] [al-Nawawi, al-Adhkar] ↩︎
  5. The continuation of the same hadith. Imam al-Nawawi states that the recitation on leaving is the same as on entering, except that «أبواب فضلك» is said in place of «أبواب رحمتك». [Sahih Muslim, no. 713] [al-Nawawi, al-Majmu‘, 2/179] ↩︎
  6. Hadith of Abu Hurairah RA, with the wording «اللهم اعصمني من الشيطان الرجيم». [Sunan Ibn Majah, no. 773] Imam al-Nawawi also mentions this addition through the narrations of Ibn al-Sunni, Ibn Majah, Ibn Khuzaymah and Ibn Hibban with the wording «اللهم أعذني من الشيطان الرجيم». [al-Nawawi, al-Adhkar] ↩︎
  7. Imam al-Nawawi: «ويقدم رجله اليمنى في الدخول واليسرى في الخروج». [al-Nawawi, al-Majmu‘, 2/179] Imam al-Bukhari has a chapter on starting with the right when entering the mosque, and mentions that Ibn ‘Umar RA «يبدأ برجله اليمنى فإذا خرج بدأ برجله اليسرى». [Sahih al-Bukhari, Book of Prayer, Chapter on Starting with the Right When Entering the Mosque] ↩︎
  8. In the narrations of Abu Dawud and others of the hadith of Abu Humayd or Abu Usayd, there is an addition to send salam upon the Prophet ﷺ before the dua. Imam al-Nawawi notes that this addition is not in the narration of Muslim but is in the others. [al-Nawawi, al-Adhkar, Chapter on What to Say When Entering and Leaving the Mosque] ↩︎
  9. Hadith of Abu Qatadah RA: «إذا دخل أحدكم المسجد فليركع ركعتين قبل أن يجلس». [Sahih al-Bukhari, no. 444] [Sahih Muslim, no. 714] ↩︎
  10. I‘tikaf is recommended at any time, is valid only in a mosque, and according to the soundest view requires staying for a while, so merely passing through is not enough. [al-Nawawi, Minhaj al-Talibin, Book of I‘tikaf: «هو مستحب كل وقت», «وإنما يصح الاعتكاف في المسجد» and «والأصح أنه يشترط في الاعتكاف لبث قدر يسمى عكوفا»] ↩︎
  11. Hadith of Ibn ‘Abbas RA when he spent the night at the house of his aunt Maymunah RA. After the muezzin called the adhan for Fajr, the Prophet ﷺ went out to the prayer while saying this dua. [Sahih Muslim, no. 763] Imam al-Nawawi recommends saying it when going out to the mosque. [al-Nawawi, al-Adhkar, Chapter on What to Say When Heading to the Mosque] ↩︎
  12. Hadith of Ibn ‘Umar RA: «من أكل من هذه الشجرة – يعني الثوم – فلا يأتين المساجد». [Sahih Muslim, no. 561] ↩︎
  13. Hadith of Fatimah RA with the wording «رب اغفر لي ذنوبي، وافتح لي أبواب رحمتك» on entering, and «أبواب فضلك» on leaving. Al-Tirmidhi said: «حديث فاطمة حديث حسن، وليس إسناده بمتصل». [Sunan al-Tirmidhi, no. 314] ↩︎
  14. I‘tikaf is valid only in a mosque. [al-Nawawi, Minhaj al-Talibin, Book of I‘tikaf] The Fatwa Committee of the Federal Territories permits tahiyyat al-masjid in a surau where the Friday prayer is held (surau diri Jumaat). [Irsyad al-Fatwa Series 103, Office of the Mufti of the Federal Territories, 25 February 2016] ↩︎
  15. On the etiquette of entering the Prophet’s Mosque, Imam al-Nawawi says: «وإذا أراد دخول المسجد استحب أن يقول ما يقوله عند دخول باقي المساجد». [al-Nawawi, al-Adhkar, Book of Hajj, Chapter on Visiting the Grave of the Messenger of Allah ﷺ] ↩︎

Further Reading

  • al-Nawawi, al-Adhkar.
  • al-Nawawi, al-Majmu‘ Sharh al-Muhadhdhab, volume 2.
  • al-Nawawi, Minhaj al-Talibin wa ‘Umdat al-Muftin.
  • al-Bukhari, Sahih al-Bukhari. Muslim, Sahih Muslim.
  • Abu Dawud, Sunan Abi Dawud. al-Tirmidhi, Sunan al-Tirmidhi. Ibn Majah, Sunan Ibn Majah. al-Nasa’i, Sunan al-Nasa’i.

Written by

Muhamad Naim Abd Manaf

Founder of AkuIslam. Writing worship guides since 2010 in plain language, with references that are checked.

اِقْرَأْ أَيْضًا

Related Reading

Chosen based on this article

Share your thoughts or questions

Your email address will not be published. Required fields are marked *