I said: Messenger of Allah, which mosque was set up first on the earth? He said: Al-Masjid al-Haram (the sacred). I (again) said: Then which next? He said: It was the Masjid Aqsa. I (again) said: How long the space of time (between their setting up)? He (the Holy Prophet) said: It was forty years. And whenever the time comes for prayer, pray there, for that is a mosque; and in the hadith transmitted by Abu Kamil (the words are):" Whenever time comes for prayer, pray, for that is a mosque (for you)."
The Book of Mosques and Places of Prayer - Sahih Muslim 520a
This narration from Sahih Muslim establishes the chronological precedence and sacred status of the two primary mosques in Islam: Al-Masjid al-Haram in Makkah and Al-Masjid al-Aqsa in Jerusalem.
Historical Primacy of Sacred Mosques
The Prophet ﷺ confirms that Al-Masjid al-Haram was the first mosque established on earth, with Al-Masjid al-Aqsa following forty years later. Scholars explain this refers to their foundation as places dedicated to the worship of Allah alone, with some opinions suggesting Adam (AS) built the Ka'bah while his sons or Prophet Ya'qub (AS) built Al-Aqsa.
The Forty-Year Interval
The forty-year period between their establishments demonstrates the continuous chain of prophethood and monotheistic worship. This timeline connects the Abrahamic tradition across generations, showing how divine guidance manifested in different times and places while maintaining theological unity.
Juridical Principle of Prayer Timing
The instruction "whenever the time comes for prayer, pray there" establishes the important legal principle that any pure place becomes a mosque when prayer time arrives. This facilitates the Muslim's worship obligations while traveling or in locations without formal mosques, emphasizing Islam's practicality and accessibility.
Spiritual Significance
This hadith elevates the status of both mosques as pillars of Islamic sacred geography. Al-Masjid al-Haram contains the Ka'bah, the qibla for all Muslims, while Al-Masjid al-Aqsa was the initial qibla and site of the Prophet's Night Journey, linking them in spiritual importance despite geographical separation.