مشكوة المصابيح Mishkat al-Masabih كتاب الصلاة The Book of Prayer
(أَوَّلُ مَسْجِدٍ)

(The very first mosque)

1 hadith
Hadith 753
وَعَنْ أَبِي ذَرٍّ قَالَ: قُلْتُ: يَا رَسُولَ اللَّهِ أَيُّ مَسْجِدٍ وُضِعَ فِي الْأَرْضِ أَوَّلُ؟ قَالَ: «الْمَسْجِدُ الْحَرَامُ» قَالَ: قُلْتُ: ثُمَّ أَيْ؟ قَالَ: «ثُمَّ الْمَسْجِدُ الْأَقْصَى» . قُلْتُ: كَمْ بَيْنَهُمَا؟ قَالَ: «أَرْبَعُونَ عَامًا ثُمَّ الْأَرْضُ لَكَ مَسْجِدٌ فَحَيْثُمَا أَدْرَكَتْكَ الصَّلَاةُ فصل»
Abu Dharr said that he asked God’s Messenger which mosque was set up first in the earth and was told that it was the sacred mosque. He asked which came next and was told that it was the Aqsa mosque. He asked how long a space of time separated their building and the Prophet told him it was forty years, adding, “Then the earth is a mosque for you, so pray wherever you are at the time of prayer.” (Bukhari and Muslim.)
Hadith Reference Mishkat al-Masabih / The Book of Prayer / Hadith: 753
Hadith Grading الألبانی: مُتَّفق عَلَيْهِ  |  زبیر علی زئی: متفق عليه
Hadith Takhrij ´تحقيق و تخريج: محدث العصر حافظ زبير على زئي رحمه الله` «متفق عليه، رواه البخاري (3366) و مسلم (2/ 520)»