The Book of Prayers (Kitab Al-Salat)

Muslim :: Book 4 : Hadith 1057

Ibrahim b. Yazid al-Tayml reported: I used to read the Qur'an with my father in the vestibule (before the door of the mosque). When I recited the ayat (verses) concerning prostration, he prostrated himself. I said to him: Father, do you prostrate yourself in the path? He said: I heard Abu Dharr saying: I asked the Messenger of Allah (may peace be upon him) about the mosque that was first set up on the earth. He said: Masjid Harim. I said: Then which next? He said: The Masjid al-Aqsa. I said: How long is the space of time between the two? He said: Forty years. He (then) further said: The earth is a mosque for you, so wherever you are at the time of prayer, pray there.

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star