al-Mustadrak (al-Hakim) 26949: The Mosque and Its Etiquette
Hazrat Fatimah (ra), the daughter of the Messenger of Allah (saw), relates that when the Messenger of Allah (saw) entered the mosque, he would say: “With the name of Allah the Exalted, peace be upon the Messenger of Allah (saw). O my Allah! Forgive me my sins and open for me the doors of Your mercy.” And when he went out (of the mosque), he would say: “With the name of Allah the Exalted, and peace be upon the Messenger of Allah (saw) the Exalted. O my Allah! Forgive me my sins and open for me the doors of Your grace.”
عَن جدّتها فَاطِمَةَ بِنْتِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَتْ كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا دَخَلَ الْمَسْجِدَ قَالَ بِسْمِ اللَّهِ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي وَافْتَحْ لِي أَبْوَابَ رَحْمَتِكَ وَإِذَا خَرَجَ قَالَ بِسْمِ اللَّهِ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ اللَّهُمَّ اغْفِرْ لِي ذُنُوبِي وَافْتَحْ لِي أَبْوَابَ فَضْلِكَ
AI-translated by Islam-Today
10 of 10 left today