Sunan Ibn Majah, Book 4, Hadith 48 (Ibn Majah 782)

It was narrated that Abu Hurairah said:

"The Messenger of Allah said: 'The greater the distance from the mosque, the greater the reward.'"