Abu Dharr reported,

I asked, "Messenger of Allah, which mosque was established on earth first?"He replied, "The Sacred Mosque."I asked, "Then which?"He said, "Masjid al-Aqsa."I asked, "How long was there between them?"He said, "Forty years. Then wherever the time of prayer overtakes you afterwards, pray there, for the merit lies in it."

Azami 12785

Sahih

عن أبي ذر قال

قلت: يا رسول الله! أي مسجد وضع في الأرض أول؟ قال: المسجد الحرام قال: قلت: ثم أي؟ قال: المسجد الأقصى قلت: كم كان بينهما؟ قال: أربعون سنة. ثم أينما أدركتك الصلاة بعد، فصله، فإن الفضل فيه.

الأعظمي 12785صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Tafsir of Surah Anbiya
Section
His saying, "And when We designated for Ibrahim the site of the House, saying do not associate anything with Me and purify My House for those who circumambulate it, and those who stand, and those who bow and make sujud." His saying, "And when We designated for Ibrahim the site of the House" means We guided him to it and settled him near it
Numbering
Jami al-Kamil 12785 (2nd edition)
Azami 12785