Abu Hurairah Radiyallahu 'anhu narrates: I heard Rasullullah Sallallahu 'alaihi wasallam saying: He who comes to my Masjid (Masjid-un-Nabwi) with no other intention but to learn or teach a good deed is like a Mujahid in the path of Allah. And, he who comes with some other intention is like one who has come to look at the belongings of others (and this looking is of no benefit to him), (Ibne-Majah: 227)
Note: The excellence mentioned in this Hadith is valid for all
masjids, as all masjids are subsidiaries of Masjid-un-Nabwi.
(Injah-ul-Haja)