"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).'"
Hadith Text
"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).'"
Commentary on the Entrance Supplication
The command to recite this specific supplication when entering the mosque indicates that one should approach the House of Allah with humility and hope, seeking divine mercy. The "gates of mercy" refer to the various means through which Allah's compassion manifests - acceptance of worship, spiritual enlightenment, and forgiveness of sins.
Scholars note that this dua prepares the worshipper's heart for devotion, reminding them that they are entering a sacred space where divine mercy descends. The phrasing acknowledges human need while affirming Allah's boundless compassion.
Commentary on the Exit Supplication
Upon departure, the believer asks for Allah's bounty (fadl), which encompasses both worldly and spiritual blessings. This demonstrates that the benefits of mosque attendance extend beyond the prayer time itself.
Classical commentators explain that "fadl" here includes continued guidance, sustenance, protection, and the reward for one's worship. The shift from seeking mercy to requesting bounty reflects the progression from spiritual preparation to carrying blessings into daily life.
Juridical Ruling and Benefits
The majority of scholars consider these supplications recommended (mustahabb) rather than obligatory. They serve to maintain constant remembrance of Allah and reinforce the sacred nature of mosque visits.
Ibn al-Qayyim noted that these duas create spiritual bookends - beginning with seeking mercy to make worship acceptable, and concluding by asking for bounty to extend the blessings. This practice transforms ordinary comings and goings into acts of worship.