Hadith 2706

حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ ، حَدَّثَنَا أَبُو بَكْرٍ يَعْنِي الْحَنَفِيَّ ، حَدَّثَنَا الضَّحَّاكُ بْنُ عُثْمَانَ ، حَدَّثَنِي سَعِيدُ الْمَقْبُرِيُّ ، عَنْ أَبِي هُرَيْرَةَ ، أَنّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ ، فَلْيُسَلِّمْ عَلَى النَّبِيِّ وَلْيَقُلِ : اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ ، وَإِذَا خَرَجَ فَلْيُسَلِّمْ عَلَى النَّبِيِّ ، وَلْيَقُلِ : اللَّهُمَّ أَجِرْنِي مِنَ الشَّيْطَانِ الرَّجِيمِ "
It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When any one of you is about to enter the mosque, he should send salutations upon the Noble Prophet (peace and blessings be upon him) and recite this supplication « اللّهُـمَّ افْتَـحْ لي أَبْوابَ رَحْمَتـِك » 'O Allah, open for me the doors of Your mercy.' And when he is about to leave the mosque, he should send blessings and salutations upon the Noble Prophet (peace and blessings be upon him) and recite this supplication «‏ اللَّهُمَّ أَجِرْنِيْ مِنَ الشَّيْطَانِ الرَّجِيمِ » 'O Allah, protect me from the accursed devil.'"
Hadith Reference صحيح ابن خزيمه / جماع أبواب ذكر أفعال اختلف الناس فى إباحته للمحرم، نصت سنة النبى صلى الله عليه وسلم أو دلت على إباحتها / 2706
Hadith Takhrij اسناده صحيح