Sayyiduna Abu Dharr Ghifari (may Allah be pleased with him) narrates: I asked, "O Messenger of Allah (peace and blessings be upon him)! Which mosque was built first on the earth?" The Prophet (peace and blessings be upon him) said: "Al-Masjid al-Haram." I asked, "O Messenger of Allah (peace and blessings be upon him)! Then which one was built after that?" He said: "Al-Masjid al-Aqsa." I asked, "What was the time span between them?" The Prophet (peace and blessings be upon him) said: "Forty years." (Then he said:) "Wherever the time of prayer comes upon you, perform the prayer there, for that place will be a mosque for you."