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 enters the mosque, he should offer greetings and recite: 'O Allah! Open for me the doors of Your mercy.' And when he leaves (the mosque), he should recite: 'O Allah! I ask You for Your bounty.'"