«إذا دخل أحدكم المسجد فليسلم على النبي وليقل: اللهم افتح لي أبواب رحمتك وإذا خرج فليسلم على النبي وليقل: اللهم اعصمني من الشيطان»
The Prophet (peace and blessings be upon him) said:
"When any of you enters the mosque, he should send salutations of peace upon the Prophet (peace and blessings be upon him) and recite this supplication: 'Allahumma iftah li abwaba rahmatik (O Allah, open for me the gates of Your mercy),' and when he leaves, he should send salutations of peace upon the Prophet (peace and blessings be upon him) and recite this supplication: 'Allahumma i'simni min al-shaytan (O Allah, protect me from Satan).'"
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 514
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[ن هـ حب ك] عن أبي هريرة. صحيح أبي داود ٣/١٤٨: ابن خزيمة.