2. Ṣalāh (Ritual Prayer)
٢۔ كتاب الصلاة
when any of you enters the mosque he should invoke blessing on the prophet ﷺ and then he should say: O Allah, open to me the gates of thy mercy. And when he goes out, he should say: O Allah, I ask thee out of Thine abundance.
سَمِعْتُ أَبَا حُمَيْدٍ أَوْ أَبَا أُسَيْدٍ الأَنْصَارِيَّ يَقُولُ قَالَ رَسُولُ اللَّهِ ﷺ إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيُسَلِّمْ عَلَى النَّبِيِّ ﷺ ثُمَّ لْيَقُلِ اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ فَإِذَا خَرَجَ فَلْيَقُلِ اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ
I met ‘Uqbah b. Muslim and said to him: it has been reported to me that someone has narrated to you from the prophet ﷺ that when he entered the mosque, he would say: I seek refuge in Allah, the Magnificent, and in His noble face, and in his eternal domain, from the accursed Devil. He asked : is it so much only? I said: Yes. He said: when anyone says so. The devil says: he is protected from me all the day long.
عَنِ النَّبِيِّ ﷺ أَنَّهُ كَانَ إِذَا دَخَلَ الْمَسْجِدَ قَالَ أَعُوذُ بِاللَّهِ الْعَظِيمِ وَبِوَجْهِهِ الْكَرِيمِ وَسُلْطَانِهِ الْقَدِيمِ مِنَ الشَّيْطَانِ الرَّجِيمِ قَالَ أَقَطُّ قُلْتُ نَعَمْ قَالَ فَإِذَا قَالَ ذَلِكَ قَالَ الشَّيْطَانُ حُفِظَ مِنِّي سَائِرَ الْيَوْمِ