Source: HadeethEnc.com, English v1.25.0
Arabic text
عَنْ أَبِي حُمَيْدٍ أَوْ عَنْ أَبِي أُسَيْدٍ قَالَ: قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَقُلِ: اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ، وَإِذَا خَرَجَ فَلْيَقُلِ: اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ».
Translation
Abu Humayd or Abu Usayd reported: The Messenger of Allah (may Allah’s peace and blessings be upon him) said: "When any of you enters the mosque, let him say: 'Allahumma iftah li abwāba rahmatik' (O Allah, open for me the gates of Your mercy). And when he leaves, let him say: 'Allahumma inni as’aluka min fadlik' (O Allah, I ask You of Your bounty)."
Explanation
The Prophet (may Allah's peace and blessings be upon him) directed his Ummah to the supplication to be said upon entering the mosque: "O Allah, open for me the gates of Your mercy." He asks Allah Almighty to provide him with the means to attain His mercy. And when he wants to leave, he should say: "O Allah, I ask You of Your bounty." He asks Allah for His bounty and more of His benevolence in providing lawful sustenance.
Benefits
- It is recommended to say this supplication upon entering the mosque and upon leaving it.
- Mercy is mentioned in relation to entering, while bounty is in relation to leaving because when a person enters the mosque, he engages in deeds that bring him closer to Allah and His Paradise. So it is befitting to mention mercy, and when he leaves, he goes about in the land in pursuit of Allah's bounty of sustenance, and so the mention of bounty befits that.
- These dhikrs are to be said upon entering the mosque and upon leaving it.
Explanation: العربية
أَرْشَدَ النبيُّ صلى الله عليه وسلم أمَّتَه إلى الدّعاء الذي يقال عند دخول المسجد: (اللَّهُمَّ افْتَحْ لي أَبْوابَ رَحْمَتِكَ)، فيسألُ اللهَ تعالى أن يهيئ له أسباب رحمته، وإذا أراد الخروج فليقل: (اللَّهُمَّ إني أَسْأَلُك مِن فَضْلِكَ)، فيسألُ اللهَ مِن فضلِه ومَزيدِ إحسانِه من الرِّزقِ الحلالِ.
- استحباب هذا الدعاء عند دخول المسجد والخروج منه.
- تخصيص ذكر الرَّحمة بالدّخول، والفضل بالخروج: أنّ الدّاخل اشتغل بما يقرِّبه إلى الله وإلى جنته فناسَب أن يذكُر الرَّحمة، فإذا خرج سعى في الأرض ابتِغاء فضل الله مِن الرِّزق، فناسَب ذكر الفَضْل.
- هذه الأذكار تقال عند إرادة دخول المسجد، وعند إرادة الخروج منه.