The Book of Remembrances — Kitāb al-Adhkār
Remembrance 2 from Chapter 20
What to say when entering and leaving the mosque
Allāhumma-ftaḥ lī abwāba raḥmatik. Allāhumma innī as’aluka min faḍlik.
We relate from Abū Ḥumayd, or Abū Usayd (رَضِيَ اللَّهُ عَنْهُ), that the Messenger of Allah (صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ) said: “When any one of you enters the mosque, he should invoke blessings upon the Messenger (صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ) and then say: O Allah, open for me the doors of Your Mercy. And when he leaves he should say: O Allah, I ask of You from Your bounty.” [1].Muslim relates this in his Ṣaḥīḥ. Abū Dāwūd, an-Nasā’ī, Ibn Mājah and others also relate it, with a ṣaḥīḥ isnād. In Muslim’s narration there is no sentence: ‘So, send greetings upon the Prophet (صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ)’, although it is in the narrations of the rest.