´It was narrated that 'Abdul-Malik bin Sa'eed said:` "I heard Abu Humaid and Abu Usaid say: 'The Messenger of Allah (ﷺ) said: "When any one of you enters the Masjid, let him say: 'Allahumma aftahli abwaba rahmatik (O Allah, open to me the gates of your mercy). And when he leaves let him say: Allahumma inni as'aluka min fadlik (O Allah, I ask You of Your bounty).'"
Related hadith on this topic
Explanation & Benefits
Hafiz Muhammad Ameen
730. Commentary: When entering, the aim is to attain Allah’s mercy, and upon coming out, one engages in seeking sustenance; therefore, both supplications are appropriate to their respective occasions. By “mercy” is meant blessings of the Hereafter and forgiveness. “Fadl” (bounty) refers to both worldly blessings and sustenance.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 730