عن أبي حُميد أو عن أبي أُسيد قال: قال رسول الله صلى الله عليه وسلم: "إذا دخل أحدكم المسجد فليقل: اللهم افتح لي أبواب رحمتك، وإذا خرج فليقل: اللهم إني أسألك من فضلك".
[صحيح] - [رواه مسلم]
المزيــد ...

Abu Humayd related that Abu Usayd reported that the Prophet (may Allah’s peace and blessings be upon him) said: "When anyone of you enters the mosque, let him say: 'O Allah, open to me the gates of Your mercy.' And when he leaves, let him say: 'O Allah, I ask You from Your bounty.'"
Sahih/Authentic. - [Muslim]

Explanation

The Prophet (may Allah’s peace and blessings be upon him) guides his Ummah in this Hadīth to the supplication to be said upon entering the mosque, and this applies to any mosque. A person entering the mosque should say: O Allah, open for me the gates of Your mercy. He asks Allah Almighty to provide him with the means to attain His mercy, to guide him to everything good, and to show mercy to him and elevate his rank in His sight. And upon leaving the mosque, one should say: O Allah, I ask You from Your bounty. He asks Allah Almighty from His bounty and benevolence to provide him with lawful sustenance. Mercy is mentioned in the supplication of entering and bounty in the supplication of leaving, because a person who enters the mosque will engage in acts of worship that will draw him closer to Allah and to His reward and Paradise, and it is suitable in this situation to mention mercy. On the other hand, when he leaves the mosque, he moves about in the land to seek sustenance and livelihood, and so it is appropriate to mention bounty here. Allah Almighty says: {When the prayer is over, disperse in the land and seek from the bounty of Allah.} [Surat al-Jumu‘ah: 10]

Translation: French Turkish Urdu Indonesian Bosnian Bengali Chinese Persian Indian Vietnamese Sinhala Uyghur Kurdish Hausa Malayalam Swahili Tamil Burmese Thai Pashto Assamese Albanian Swedish amharic Dutch Gujarati Dari
View Translations

Benefits from the Hadith

  1. The Hadīth contains the dhikr to be said upon entering and leaving the mosque.
  2. Mercy is mentioned in relation to entering the mosque, because it is a place where people seek Allah's mercy and forgiveness. And bounty is mentioned in relation to leaving the mosque, because outside it, people seek sustenance and livelihood, and so they are asked to supplicate their Lord with words that suit their condition.