It was narrated that Abu Dharr Al-Ghifari said: "I said: '0 Messenger of Allah! Which Masjid was built first?' He said: 'Al-Masjid AI-Hariim (in Makkah).' I said: 'Then which?' He said: 'Then Al-Masjid AI-Aqsa (in Jerusalem).' I said: 'How many years between them?' He said: 'Forty years, but the whole earth is a Masjid for you, so pray wherever you are when the time for prayer comes.''' (Sahih)