Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
nasai-kubra:9839Qutaybah b. Saʿīd > al-Layth > Ibn ʿAjlān > Saʿīd al-Maqburī > Abū Hurayrah > Kaʿb al-Aḥbār

[Machine] "O Abu Hurairah, remember two things from me that I advise you with when you enter the mosque: pray upon the Prophet Muhammad ﷺ and say, 'O Allah, open for me the doors of Your mercy.' And when you exit the mosque, pray upon the Prophet Muhammad ﷺ and say, 'O Allah, protect me from Satan, the rejected one.' This was narrated by Sa'id bin Abu Sa'id al-Maqburi from his father from Abu Hurairah from Ka'b."  

الكبرى للنسائي:٩٨٣٩أَخْبَرَنَا قُتَيْبَةُ بْنُ سَعِيدٍ قَالَ حَدَّثَنَا اللَّيْثُ عَنِ ابْنِ عَجْلَانَ عَنْ سَعِيدٍ الْمَقْبُرِيِّ عَنْ أَبِي هُرَيْرَةَ أَنَّ كَعْبَ الْأَحْبَارِ قَالَ

يَا أَبَا هُرَيْرَةَ احْفَظْ مِنِّي اثْنَتَيْنِ أُوصِيكَ بِهِمَا إِذَا دَخَلْتَ الْمَسْجِدَ فَصَلِّ عَلَى النَّبِيِّ ﷺ وَقُلِ اللهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ وَإِذَا خَرَجْتَ مِنَ الْمَسْجِدِ فَصَلِّ عَلَى النَّبِيِّ ﷺ وَقُلِ اللهُمَّ احْفَظْنِي مِنَ الشَّيْطَانِ خَالَفَهُ ابْنُ أَبِي ذِئْبٍ رَوَاهُ عَنْ سَعِيدِ بْنِ أَبِي سَعِيدٍ الْمَقْبُرِيِّ عَنْ أبيه عَنْ أَبِي هُرَيْرَةَ عَنْ كَعْبٍ