The dua for entering the mosque is one of the shortest du'as a Muslim learns, and one of the most often repeated: five times a day for someone who prays in the masjid, and every Friday for almost everyone. Its companion, the dua for leaving the mosque, is just as short. Together they turn the doorway of the mosque into a small moment of remembrance, asking for mercy on the way in and for bounty on the way out.
This guide gives both du'as in transliteration and meaning (the Arabic page of this guide shows the full Arabic text), with their source, exactly as they appear in the QASAS app, which follows the book Hisn al-Muslim. Then we look at what the Quran itself says about mosques, explained from al-Tafsir al-Muyassar, al-Sa'di and Ibn Kathir: who the mosques belong to, who truly fills them, how to come to them, and why it fits so well to ask for mercy when you enter and for bounty when you leave.
What is the dua for entering the mosque?
The dua for entering the mosque is to say "Allahumma iftah li abwaba rahmatik" as you step inside.
In transliteration: Allahumma-ftah li abwaba rahmatik.
Meaning: "O Allah, open for me the gates of Your mercy." (Muslim 713)
Notice what it asks for. You are walking through a door made of wood or glass, and you ask Allah to open for you a far greater door: the gates of His mercy. The mosque is a place of prayer, Quran, dhikr and learning, and every one of these is a cause of mercy. The du'a asks that the visit you are beginning be one in which those gates are opened for you.
The Quran ties mercy to those who do good and call on Allah sincerely: “Indeed, the mercy of Allāh is near to the doers of good.”
(Quran 7:56) Al-Muyassar explains the ayah as a command to call on Allah sincerely, in fear of His punishment and hope for His reward, and then a promise that His mercy is near to those who do good. Entering the mosque to pray is exactly that kind of good.
What is the dua for leaving the mosque?
The dua for leaving the mosque is to say "Allahumma inni as'aluka min fadlik" as you step out.
In transliteration: Allahumma inni as'aluka min fadlik.
Meaning: "O Allah, I ask You of Your bounty." (Muslim 713)
"Bounty" (fadl) is Allah's generous giving: provision, good work, a lawful income, help in your affairs and every good thing He gives beyond what anyone could earn. When you leave the masjid you return to work, study, family and the market, and the du'a asks Allah to fill that part of your day with His bounty as well.
Why mercy on entering and bounty on leaving?
Because the Quran itself pairs the prayer with remembrance inside, and seeking Allah's bounty in the world once it is over. In Surah al-Jumu'ah, Allah calls the believers to leave trade and come to the Friday prayer, and then says:
﴿يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓا۟ إِذَا نُودِىَ لِلصَّلَوٰةِ مِن يَوْمِ ٱلْجُمُعَةِ فَٱسْعَوْا۟ إِلَىٰ ذِكْرِ ٱللَّهِ وَذَرُوا۟ ٱلْبَيْعَ ۚ ذَٰلِكُمْ خَيْرٌ لَّكُمْ إِن كُنتُمْ تَعْلَمُونَ ٩ فَإِذَا قُضِيَتِ ٱلصَّلَوٰةُ فَٱنتَشِرُوا۟ فِى ٱلْأَرْضِ وَٱبْتَغُوا۟ مِن فَضْلِ ٱللَّهِ وَٱذْكُرُوا۟ ٱللَّهَ كَثِيرًا لَّعَلَّكُمْ تُفْلِحُونَ ١٠﴾(9) O you who have believed, when [the adhān] is called for the prayer on the day of Jumuʿah [Friday], then proceed to the remembrance of Allāh and leave trade. That is better for you, if you only knew. (10) And when the prayer has been concluded, disperse within the land and seek from the bounty of Allāh, and remember Allāh often that you may succeed.
Al-Muyassar explains that once you have heard the khutbah and prayed, you may spread out in the land and seek Allah's provision through your effort, and remember Allah often in every state, so that you may win the good of this world and the next. Al-Sa'di adds that because trade is a place where people easily forget Allah, the ayah commands remembering Him often, and that much remembrance is the greatest cause of success.
Ibn Kathir explains that after forbidding trade from the time of the call, Allah permits it again once the prayer is finished. He also records that one of the early Muslims of the generation after the Companions, 'Irak ibn Malik, used to stand at the door of the mosque after the Friday prayer and say words to the effect of: "O Allah, I answered Your call, I prayed what You made obligatory, and I have spread out as You commanded me, so provide for me from Your bounty, and You are the best of providers."
So the two du'as fit the two halves of the visit. Inside is the place of worship, where you ask for mercy. Outside is the place of seeking a living, where you ask for bounty. The Quran describes the people of the mosques in the same way: “That Allāh may reward them [according to] the best of what they did and increase them from His bounty.”
(Quran 24:38)
Who the mosques belong to
The first thing the Quran teaches about mosques is that they belong to Allah alone, and so does every prayer and du'a made in them:
﴿وَأَنَّ ٱلْمَسَـٰجِدَ لِلَّهِ فَلَا تَدْعُوا۟ مَعَ ٱللَّهِ أَحَدًا ١٨﴾(18) And [He revealed] that the masjids are for Allāh, so do not invoke with Allāh anyone.
Al-Muyassar explains that mosques exist for the worship of Allah alone, so nothing else may be worshipped in them, and du'a and worship there must be purely for Him; mosques were built only so that Allah alone is worshipped in them. Al-Sa'di explains "do not invoke with Allah anyone" as covering both kinds of du'a: the du'a of worship and the du'a of asking.
That is why the du'as at the door are addressed directly to Allah. You do not ask anyone to open the gates of mercy for you except Him. The story of Prophet Ibrahim (peace be upon him) shows the opposite picture: a temple full of idols that his people worshipped beside Allah, which he entered alone and broke. You can watch that scene in QASAS.

"Houses which Allah has ordered to be raised"
The Quran calls the mosques houses that Allah has permitted and ordered to be raised, in which His name is remembered morning and evening:
﴿فِى بُيُوتٍ أَذِنَ ٱللَّهُ أَن تُرْفَعَ وَيُذْكَرَ فِيهَا ٱسْمُهُۥ يُسَبِّحُ لَهُۥ فِيهَا بِٱلْغُدُوِّ وَٱلْـَٔاصَالِ ٣٦ رِجَالٌ لَّا تُلْهِيهِمْ تِجَـٰرَةٌ وَلَا بَيْعٌ عَن ذِكْرِ ٱللَّهِ وَإِقَامِ ٱلصَّلَوٰةِ وَإِيتَآءِ ٱلزَّكَوٰةِ ۙ يَخَافُونَ يَوْمًا تَتَقَلَّبُ فِيهِ ٱلْقُلُوبُ وَٱلْأَبْصَـٰرُ ٣٧﴾(36) [Such niches are] in houses [i.e., mosques] which Allāh has ordered to be raised and that His name be mentioned [i.e., praised] therein; exalting Him within them in the morning and the evenings (37) [Are] men whom neither commerce nor sale distracts from the remembrance of Allāh and performance of prayer and giving of zakāh. They fear a Day in which the hearts and eyes will [fearfully] turn about -
Al-Sa'di explains that these houses are the mosques, the most beloved places to Allah, and that "raising" them includes building them, sweeping them, cleaning them of filth and harm, and protecting them from idle talk and voices raised in anything but the remembrance of Allah. "His name is remembered in them" includes every prayer, obligatory and voluntary, reciting the Quran, tasbih, tahlil, learning and teaching, and i'tikaf. He also notes that the morning and evening are named because of their special honour, which is why the morning and evening adhkar are prescribed at those times.
Ibn Kathir explains that the mosques are the houses in which Allah is worshipped and His oneness declared, and that raising them means purifying them from dirt, idle talk, and words and deeds that do not befit them.
The next ayah describes the people of these houses: men whom neither trade nor buying distracts from the remembrance of Allah, prayer and zakah. Al-Muyassar explains that they fear the Day of Resurrection, when hearts turn between hope of salvation and fear of ruin.
Those who truly fill the mosques
﴿إِنَّمَا يَعْمُرُ مَسَـٰجِدَ ٱللَّهِ مَنْ ءَامَنَ بِٱللَّهِ وَٱلْيَوْمِ ٱلْـَٔاخِرِ وَأَقَامَ ٱلصَّلَوٰةَ وَءَاتَى ٱلزَّكَوٰةَ وَلَمْ يَخْشَ إِلَّا ٱللَّهَ ۖ فَعَسَىٰٓ أُو۟لَـٰٓئِكَ أَن يَكُونُوا۟ مِنَ ٱلْمُهْتَدِينَ ١٨﴾(18) The mosques of Allāh are only to be maintained by those who believe in Allāh and the Last Day and establish prayer and give zakāh and do not fear except Allāh, for it is expected that those will be of the [rightly] guided.
Al-Muyassar explains that only those who believe in Allah and the Last Day, pray, give zakah and do not fear blame for Allah's sake truly care for the houses of Allah and fill them, and these are the ones guided to the truth. Al-Sa'di explains that this "filling" ('imarah) is of two kinds: maintaining the building, and filling it with the remembrance of Allah, prayer and worship, and that the second is the nobler of the two.
You do not need to fund a mosque to be among its people. Walking in with the du'a of mercy, praying, remembering Allah and walking out with the du'a of bounty is how ordinary believers fill the houses of Allah every day.
Coming to the mosque at your best
﴿۞ يَـٰبَنِىٓ ءَادَمَ خُذُوا۟ زِينَتَكُمْ عِندَ كُلِّ مَسْجِدٍ وَكُلُوا۟ وَٱشْرَبُوا۟ وَلَا تُسْرِفُوٓا۟ ۚ إِنَّهُۥ لَا يُحِبُّ ٱلْمُسْرِفِينَ ٣١﴾(31) O children of Adam, take your adornment [i.e., wear your clothing] at every masjid, and eat and drink, but be not excessive. Indeed, He likes not those who commit excess.
Al-Muyassar explains "take your adornment at every masjid" as being, at every prayer, in a state of the lawful adornment: clothes that cover the body properly, cleanliness and purity. Al-Sa'di says it may also mean going beyond the minimum, with clean, good clothing. Ibn Kathir notes that, based on this ayah and what came in the Sunnah, it is recommended to dress well for prayer, especially on Friday and on Eid, and that perfume and the siwak are part of that adornment.
So the du'a at the door is the last step of a preparation that begins at home: wudu, clean clothes, a pleasant smell, and a calm walk to the masjid.
The mihrab of Maryam: mercy and provision in a place of worship
The Quran tells of Maryam (peace be upon her), who was raised in a place of worship, the mihrab, under the care of Prophet Zakariya (peace be upon him). Every time he came in to her, he found provision with her:
﴿فَتَقَبَّلَهَا رَبُّهَا بِقَبُولٍ حَسَنٍ وَأَنۢبَتَهَا نَبَاتًا حَسَنًا وَكَفَّلَهَا زَكَرِيَّا ۖ كُلَّمَا دَخَلَ عَلَيْهَا زَكَرِيَّا ٱلْمِحْرَابَ وَجَدَ عِندَهَا رِزْقًا ۖ قَالَ يَـٰمَرْيَمُ أَنَّىٰ لَكِ هَـٰذَا ۖ قَالَتْ هُوَ مِنْ عِندِ ٱللَّهِ ۖ إِنَّ ٱللَّهَ يَرْزُقُ مَن يَشَآءُ بِغَيْرِ حِسَابٍ ٣٧﴾(37) So her Lord accepted her with good acceptance and caused her to grow in a good manner and put her in the care of Zechariah. Every time Zechariah entered upon her in the prayer chamber, he found with her provision. He said, "O Mary, from where is this [coming] to you?" She said, "It is from Allāh. Indeed, Allāh provides for whom He wills without account."
Al-Sa'di explains that she kept to her place of prayer and devoted herself to worshipping her Lord, and that the provision came to her without effort or earning, a gift Allah gave her. Her answer, “Indeed, Allāh provides for whom He wills without account.”
(Quran 3:37), is the spirit of the du'a for leaving the mosque: all bounty is from Allah, and He gives without measure.
The Quran goes on to say that it was there that Zakariya called on his Lord for a righteous child, and that the angels gave him the good news of Yahya “while he was standing in prayer in the chamber”
(Quran 3:39). A place of prayer was, for both of them, a place where du'a was answered.
Watch this story in QASASMaryam and the Palm TreeAlone in the desert... then the dates fell.Open on Google Play →The two du'as at a glance
| When | What to say | Meaning | Source |
|---|---|---|---|
| Entering the mosque | "Allahumma-ftah li abwaba rahmatik" | O Allah, open for me the gates of Your mercy | Muslim 713 |
| Leaving the mosque | "Allahumma inni as'aluka min fadlik" | O Allah, I ask You of Your bounty | Muslim 713 |
| Reminder: the mosques are for Allah | "The masjids are for Allah, so do not invoke with Allah anyone" | Pray and make du'a to Allah alone | Quran 72:18 |
| Reminder: after the prayer | "Disperse within the land and seek from the bounty of Allah" | Go back to your day asking for His bounty | Quran 62:10 |
Simple etiquette at the door
The ayat above already give a short code of manners for the mosque, as the tafsir explains them. Come clean and well dressed (7:31). Help keep the mosque clean and free of harm, and keep your voice for prayer, Quran and dhikr rather than idle talk, which is what al-Sa'di says "raising" the houses of Allah includes (24:36). Make your du'a and worship there for Allah alone (72:18). And when the prayer is over, go back to your day remembering Allah often (62:10).
The two du'as themselves are recommended, not obligatory: if you forget them, your prayer is not affected. If you remember them a step after the door, simply say them then.
Teaching children the mosque du'as
The mosque door is a perfect place to teach children, because they pass through it often and it is easy to make it a habit.
- Stop at the door together. Pause for two seconds before going in and say the du'a of mercy out loud, so the child hears it every time.
- One du'a first. Teach the entering du'a for a few weeks, then add the leaving du'a.
- Explain one word. Ask: "What are the gates of mercy?" and "What is bounty?" Let them answer in their own words.
- Link it to a story. Tell them about Maryam in her mihrab and the provision that came from Allah, then let them watch her story in the app.
- Show them the houses of Allah are special. Ask them to help keep shoes in order, speak softly and pick up a piece of litter: this is "raising" the mosque in the sense the tafsir describes.
Find these du'as in QASAS
Both du'as are in the QASAS app, which is free, with no ads, no account and no tracking. Open the Du'as section and choose The mosque: each du'a shows its Arabic text, its meaning in your language and its source, so you can learn it before your next visit.
The same app helps you get to the mosque on time: prayer times calculated on your device with the adhan, a qibla compass for when you pray elsewhere (see our guide on how to find the qibla direction), and a nearby mosques button. On Friday it reminds you to read Surah al-Kahf, which we explain in reading Surah al-Kahf on Friday. The ayat in this article open in the full mushaf with tafsir, al-Muyassar and Ibn Kathir, with recitation and word-by-word meaning. And at its heart QASAS is a prophet stories app: cinematic stories you can watch or read page by page, including the story of Maryam, each followed by a short quiz.
Frequently asked questions
What is the dua for entering the mosque?
The dua for entering the mosque is "Allahumma-ftah li abwaba rahmatik", meaning "O Allah, open for me the gates of Your mercy" (Muslim 713). You say it as you step into the masjid.
What is the dua for leaving the mosque?
The dua for leaving the mosque is "Allahumma inni as'aluka min fadlik", meaning "O Allah, I ask You of Your bounty" (Muslim 713). You say it as you step out.
Why do we ask for mercy when entering and bounty when leaving?
Because the mosque is a place of worship, which brings mercy, and leaving it means returning to work and seeking a living. The Quran says after the Friday prayer: “disperse within the land and seek from the bounty of Allāh”
(Quran 62:10), and al-Muyassar explains this as seeking Allah's provision through your effort.
Is it obligatory to say the dua when entering the mosque?
No. It is recommended, not obligatory, and your prayer is valid without it. It is still a light and beautiful habit worth keeping on every visit.
What if I forget the dua at the door?
Say it as soon as you remember. Nothing is lost by saying it a moment late, and next time you will be more likely to remember it at the door.
What does the Quran say about mosques?
The Quran says that “the masjids are for Allāh, so do not invoke with Allāh anyone”
(Quran 72:18), that they are houses Allah ordered to be raised and in which His name is remembered (24:36), and that they are truly filled by those who believe, pray, give zakah and fear only Allah (9:18).
Can women say the mosque du'as?
Yes. The du'as are for anyone entering or leaving the mosque, men, women and children alike, and the wording is the same.
Should I say the du'a when entering a prayer room at work or school?
The du'a in the app is reported for the mosque. Many people also make du'a in a prayer room, and asking Allah for His mercy and bounty is good at any time, but the specific du'a is tied to the masjid.
Sources
Quran: Al 'Imran 3:37-39; al-A'raf 7:31, 7:56; al-Tawbah 9:18; al-Nur 24:36-38; al-Jumu'ah 62:9-10; al-Jinn 72:18. Tafsir: al-Tafsir al-Muyassar, Tafsir al-Sa'di (Taysir al-Karim al-Rahman) and Tafsir Ibn Kathir on these ayat. Du'a wording and references as in the QASAS app (The mosque), following Hisn al-Muslim.
Updated: · By QASAS




