Abu Dharr reported,

I asked, "Messenger of Allah, which masjid was established first?"He replied, "Masjid al-Haram."I asked, "Then which?"He said, "Then Masjid Aqsa."I asked, "How much time was there between them?"He said, "Forty years. And wherever the time for prayer overtakes you, pray, for it is a masjid."By his question he meant, which masjid was established on the earth first.

Ahmad 21391

Sahih

حدثنا عبيدة حدثنا الأعمش فذكره إلا أنه قال أي مسجد وضع في الأرض أول

أحمد 21391صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Dharr Ghifari
Numbering
Darussalam 21391
Ahmad 21391