Skip to the main content
Encyclopedia of Translated Hadiths (HadeethEnc) · Jurisprudence and Juristic Principles
Number: 65418

When any of you enters the mosque, let him send peace upon the Prophet and say: Allāhumma iftahli abwāba rahmatik (O Allah, open for me the gates of Your mercy)

عَنْ أَبِي هُرَيْرَةَ رَضيَ اللهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِذَا دَخَلَ أَحَدُكُمْ المَسْجِدَ فَلْيُسَلِّمْ عَلَى النَّبِيِّ وَلْيَقُلْ: اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ، وَإِذَا خَرَجَ فَلْيُسَلِّمْ عَلَى النَّبِيِّ وَلْيَقُلْ: اللَّهُمَّ اعْصِمْنِي مِنْ الشَّيْطَانِ الرَّجِيمِ»، وَلِلْحَاكِمِ: «وَإِذَا خَرَجَ فَلْيُسَلِّمْ عَلَى النَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ وَلْيَقُلْ: اللَّهُمَّ أَجِرْنِي مِنَ الشَّيْطَانِ الرَّجِيمِ».
Abu Hurayrah (may Allah be pleased with him) reported that the Messenger of Allah (ﷺ) said: "When any of you enters the mosque, let him send peace upon the Prophet and say: Allāhumma iftahli abwāba rahmatik (O Allah, open for me the gates of Your mercy). And when he leaves, let him send peace upon the Prophet and say: Allāhumma i‘simni min ash-shaytān ar-rajīm (O Allah, protect me from the accursed devil)." In another narration by Al-Hākim: "When he leaves, let him send peace upon the Prophet (ﷺ) and say: Allāhumma ajirni min ash-shaytān ar-rajīm (O Allah, save me from the accursed devil)."

Translation by HadeethEnc.com

Grade[Hasan][Narrated by Ibn Mᾱjah and Al-Hᾱkim]

Explanation

The Prophet (ﷺ) guided the Muslim, when entering the mosque, to send peace and blessings upon the Prophet (ﷺ) by saying: Allāhumma salli wa sallim ‘ala Muhammad (O Allah, send Your blessings and peace upon Muhammad), and then to say: Allāhumma iftahli abwāba rahmatik (O Allah, open for me the gates of Your mercy). And when he leaves, he should send peace upon the Prophet and say: Allāhumma i‘simni min ash-shaytān ar-rajīm (O Allah, protect me from the accursed devil). In another narration by Al-Hākim: And say: Allāhumma ajirni min ash-shaytān ar-rajīm (O Allah, save me from the accursed devil).

Benefits of the hadith

  • It is recommended to say this supplication upon entering the mosque and upon leaving it.
  • This supplication is to be generally recited in all mosques, including the Sacred Mosque.
  • The specific mention of mercy when entering and seeking protection from the devil when exiting: The one entering is engaged in what brings him closer to Allah and His Paradise, so it is fitting to mention mercy. When exiting, he ventures into the world with its distractions and preoccupations, so it is appropriate to ask Allah for protection and preservation from the devil.

HadeethEnc.com · English edition v1.25.0, updated 2026-05-10 · Open on HadeethEnc.com