عن أبي بن كعب رضي الله عنه قال: كان رجل من الأنصار لا أعلم أحدا أبعد من المسجد منه، وكانت لا تخطئه صلاة، فقيل له: لو اشتريت حمارا لتركبه في الظلماء وفي الرمضاء، قال: ما يسرني أن منزلي إلى جنب المسجد، إني أريد أن يكتب لي ممشاي إلى المسجد، ورجوعي إذا رجعت إلى أهلي. فقال رسول الله صلى الله عليه وسلم : «قد جمع الله لك ذلك كله»
[صحيح] - [رواه مسلم]
المزيــد ...
Ubayy ibn Ka‘b (may Allah be pleased with him) reported: There was a man from the Ansār who, as far as I know, lived farther from the mosque than anyone else, and he never missed a prayer. It was said to him: "If only you would buy a donkey so that you may ride it in the darkness and the scorching heat." He said: "I do not like that my house be near the mosque, for I want the steps I take to the mosque and back from it to my family to be recorded for me." Upon this, the Messenger of Allah (may Allah’s peace and blessings be upon him) said: "Verily, Allah has gathered all of that for you."
[Authentic hadith] - [Narrated by Muslim]
Going to mosques and coming back from them merit reward if one does it seeking thereby the reward from Allah, the Exalted. This Hadīth mentions a man whose house was distant from the mosque. However, he used to come to the mosque for every prayer, expecting thereby a reward from Allah for his walking to the mosque and walking back to his house. Some people said to him: "If only you purchased a donkey to ride it in the darkness of the night and the heat of the day, " meaning in the dark to attend the ‘Ishā' and Fajr prayers and on very hot days, especially that the climate of Hejaz is hot. The man replied that he would not like to live right next to the mosque, and that he was pleased with living far from it because he walks many steps to the mosque and many steps back from it. If he lived closer to the mosque, all these steps would not be recorded for him (in his record of good deeds). He clarified to them that he expected the reward from Allah, the Exalted, for his walking to and back from the mosque. Thereupon, the Messenger of Allah (may Allah’s peace and blessings be upon him) said to him: "Allah has gathered all that for you", meaning: Allah has fulfilled your wish of having your steps to and from the mosque recorded for you. According to another narration, the Prophet (may Allah's peace and blessings be upon him) said to the man: "Indeed, you will have the reward that you expected."