Sayyiduna Abu Humayd Sa'idi (may Allah be pleased with him) or perhaps Sayyiduna Abu Usayd Sa'idi (may Allah be pleased with him) narrates: The Prophet Muhammad (peace and blessings be upon him) said: "When a person comes to the mosque, he should recite: 'O Allah! Open for me the doors of Your mercy.' And when he goes out, he should recite: 'O Allah! I ask You for Your bounty.'"