Hadith 1598
Sayyiduna Abu Dharr Ghifari (may Allah be pleased with him) narrates: I asked, "O Messenger of Allah! Which mosque was built first?" The Prophet (peace and blessings be upon him) said, "Al-Masjid al-Haram, then Al-Masjid al-Aqsa." The narrator says: I asked, "What was the time span between the two?" The Prophet (peace and blessings be upon him) said, "There was a span of forty years between them. Wherever the time of prayer comes upon you, perform the prayer there; that (place) will be a mosque."