«كان إذا دخل المسجد قال: أعوذ بالله العظيم وبوجهه الكريم وسلطانه القديم من الشيطان الرجيم وقال: إذا قال ذلك حفظ منه سائر اليوم»
It was the practice of the Prophet (peace and blessings be upon him):
"When he (peace and blessings be upon him) entered the mosque, he would say: I seek refuge in Allah the Magnificent, in His Noble Face and in His eternal authority from Satan the accursed. And he (peace and blessings be upon him) said: Whoever says this is protected from him (Satan) for the rest of the day."