´It was narrated that Abu Humaid As-Sa'idi said:` "The Messenger of Allah said: 'When anyone of you enters the mosque, let him send peace upon the prophet, then let him say: "Allahummaftah li abwaba rahmatika (O Allah, open to me the gates of Your mercy)." And when he leaves, let him say: "Allahumma inni as'aluka min fadlika. (O Allah, I ask of you from Your bounty)."
Explanation & Benefits
Maulana Ataullah Sajid
Commentary:
The purpose of entering the mosque is worship, which is a means for the descent of Allah’s mercies; therefore, upon entering the mosque, one asks Allah for mercy.
Upon leaving the mosque, a person becomes engaged in other activities related to his livelihood; thus, at that time, one asks Allah for His bounty so that he may obtain lawful and blessed sustenance.
Source: Commentary on Sunan Ibn Mājah by Mawlānā ‘Atā’ullāh Sājid, Page: 772