Question:
When I enter the mosque, Satan casts whispers (waswas) into me. What should I do?
Answer:
It is narrated from Abu Hurayra (may Allah be pleased with him) that the noble Prophet ﷺ said:
«إذا دخل أحدكم المسجد فليسلم على النبى صلى الله عليه وسلم، وليقل اللهم افتح لي أبواب رحمتك. وإذا خرج فليسلم على النبى صلى الله عليه وسلم، وليقل: اللهم اعصمني من الشيطان الرجيم»
When any of you enters the mosque, let him invoke peace upon the Prophet ﷺ and say «اللهم افتح لي أبواب رحمتك» (O Allah! Open for me the doors of Your mercy), and when he leaves, let him invoke peace upon the noble Prophet ﷺ and say «اللهم اعصمني من الشيطان الرجيم» (O Allah! Protect me from the accursed Satan).
It is narrated from Anas ibn Malik (may Allah be pleased with him) that he said that the Messenger of Allah ﷺ said:
«من قال: يعني إذا خرج من بيته، باسم الله توكل على الله، ولا حول ولا قوة إلا بالله. يقال له حينئذ : كفيت، و وقيت، وهديت، وتنحى عنه الشيطان فيقول الشيطان لآخر: كيف لك برجل قد هدي وكفى ووقي؟»
Whoever says when leaving his house: «بسم الله توكلت على الله، ولا حول ولا قوة إلا بالله» (In the name of Allah (I leave my house), I have placed my trust in Allah alone; there is no power to do good or to refrain from sin except with Allah), it is said to him at that time: You have been sufficed, protected and guided, and Satan keeps away from him, and he says to another satan: How will you (overcome) a man who has been given guidance, sufficiency and protection?