A mosque is a sacred place of peace and prayer. It is where hearts find calm and souls draw near to Allah. Showing respect for this holy space is very important. That is why Muslims say specific duas when entering and leaving the masjid.

When entering, the Prophet ﷺ taught us to say in Arabic:

“A‘ūdhu billāhil‑‘Aẓīm… Bismillāh, wassalātu was‑salāmu ‘alā Rasūlillāh. Allāhumma iftah lī abwāba raḥmatik.”

When leaving, we say:

“Bismillāh, wassalātu was‑salāmu ‘alā Rasūlillāh. Allāhumma innī as’aluka min faḍlik, Allāhumma a‘ṣimnī min ash‑shayṭānir‑rajīm.”

What is the Dua for Entering the Mosque?

When the Prophet ﷺ entered the masjid, he would recite a beautiful dua to seek Allah’s mercy and protection. A clear narration from Sunan Ibn Mājah (Hadith 771) states that Fāṭimah (RA) said:

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

Transliteration:
Bismillāh, was‑salāmu ‘alā Rasūlillāh. Allāhumma ighfir lī dhunūbī wa‑ftah lī abwāba raḥmatik.

Translation:
In the Name of Allah and peace upon His Messenger. O Allah, forgive my sins and open for me the gates of Your mercy.

Another narration (Abu Dāwūd 4591, Sunan Abī Dāwūd 466) adds a preceding protection:

Arabic:
أَعُوذُ بِاللَّهِ الْعَظِيمِ … مِنَ الشَّيْطَانِ الرَّجِيمِ

Transliteration:
A‘ūdhu billāhil‑‘Aẓīm … minash‑shayṭāni r‑rajīm.

Translation:
I seek refuge in Allah, the Magnificent … from the accursed Satan.

Explanation: This dua begins with seeking refuge, acknowledging our need for protection, followed by blessings on the Prophet ﷺ. Then the heart’s plea: forgiving past wrongs and asking for Allah’s mercy inside His sacred house. It reminds us to be humble and mindful. The act of entering prayerfully sets our intention on worship and turning to Allah with sincerity.

Book Free Trial Class Now 

What is the Dua for Leaving the Mosque?

Upon leaving the masjid, the Prophet ﷺ made dua for Allah’s grace and protection. Sunan Abū Dāwūd (Hadith 465) recounts Abu Usaid al‑Ansārī reporting:

Arabic:
بِسْمِ اللَّهِ وَالسَّلاَمُ عَلَى رَسُولِ اللَّهِ اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ ، اللَّهُمَّ اعْصِمْنِي مِنَ الشَّيْطَانِ الرَّجِيمِ

Transliteration:
Bismillāh, was‑salāmu ‘alā Rasūlillāh. Allāhumma innī as’aluka min faḍlik. Allāhumma a‘ṣimnī minash‑shayṭānir‑rajīm.

Translation:
In the Name of Allah and peace upon His Messenger. O Allah, I ask You from Your bounty. O Allah, protect me from the accursed Satan.

Another variant exists:

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

Transliteration:
Allāhumma ighfir lī dhunūbī wa‑ftah lī abwāba faḍlik.

Translation:
O Allah, forgive my sins and open for me the gates of Your grace.

Explanation: This dua includes: praise and peace on the Prophet ﷺ, a heartfelt request for Allah’s bounty (everything good in life), forgiveness, and protection from Satan. It reflects turning back to daily life asking Allah’s continued support. The dua aligns with mindful living, carrying spiritual light outside the mosque.

How to Enter and Leave a Mosque?

  1. Approach the entrance with respect.
    Mentally prepare to enter a sacred place.
  2. Step in with your right foot.
    This is the Sunnah of the Prophet ﷺ.
  3. Say the full dua for entering the mosque:

Arabic:
أَعُوذُ بِاللَّهِ الْعَظِيمِ … بِسْمِ اللَّهِ، اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي، وَافْتَحْ لِي أَبْوَابَ رَحْمَتِك

  1. Pray 2 rak‘ahs (units) of Tahiyyat al-Masjid
    This is a Sunnah prayer done upon entering, before sitting.

Steps to Leave the Mosque

  1. Step out with your left foot.
    Leaving begins with the left foot, following the Sunnah.
  2. Say the full dua for leaving the mosque:

Arabic:
بِسْمِ اللَّهِ، اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ، اللَّهُمَّ اعْصِمْنِي مِنَ الشَّيْطَانِ الرَّجِيمِ

  1. Walk out calmly and respectfully.
    Carry the blessings of the masjid with you.

Why Ask for Grace and Bounty When Leaving the Mosque?

Making dua for Allah’s grace (faḍl) when leaving the mosque highlights dependence on Him in everyday life. Scholars explain that mercy inside is about the soul’s purification; bounty outside is for worldly provision and well-being. The Qur’an encourages believers to seek bounty after prayer:

“So when the prayer is complete, disperse through the land and seek of Allah’s bounty.” (Qur’an 62:10).

By seeking bounty, the dua connects spiritual worship with practical needs—sustenance, strength, guidance in the world. It reminds us Allah gives both spiritual and material blessings. We leave with prayer, humility, and reliance on Him, blending faith with real-life needs.

Final Words

Entering and leaving the mosque is not just a physical act—it is a moment of worship filled with deep meaning. The duas taught by the Prophet ﷺ remind us to be humble, ask for mercy, and seek Allah’s help in every step. Following these etiquettes brings peace and blessings into our lives.

To learn more about these beautiful Sunnahs and other essential Islamic teachings, Mishkah Academy offers expert online Quran and online Islamic studies classes. Start your learning journey with trusted teachers today at Mishkah Academy.

Book Free Trial Class Now