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.'"