I asked, "Messenger of Allah, which mosque was established on earth first?"He replied, "The Sacred Mosque."I asked, "Then which?"He said, "The Aqsa Mosque."I asked, "How long was between them?"He said, "Forty years. And wherever you find yourself when the time for prayer comes, pray there, for it is a mosque."
قلت: يا رسول الله! أي مسجد وضع في الأرض أول؟ قال: المسجد الحرام قلت: ثم أي؟ قال: المسجد الأقصى قلت: كم بينهما؟ قال: أربعون سنة، وأينما أدركتك الصلاة فصل فهو مسجد.
Bukhari narrated it in "The Prophets" (3366) and Muslim in "The Mosques" (520), both through the hadith of Abdul-Wahid, "Amash narrated to us, Ibrahim Taymi narrated to us, from his father, who said, 'I heard Abu Dharr say,'" then he related it.His saying, "Indeed, the first House" [Al Imran 3:96] contains an indication of the descent of Adam in Makkah, because the first house established for worship was established for the first human being.His saying, "in Bakkah" [Al Imran 3:96], means Makkah. Makkah has several names, among them Bakkah, so called because it crushes the necks of the oppressors and tyrants. It is also said that it is because people crowd together there, meaning they throng together.It has been related from Ibn Abbas that Makkah extends from the mountain pass to Tanim, while Bakkah extends from the House to the open valley. Other explanations have also been given.Among the names of Makkah are the Secure City, the Mother of Towns, the Sanctified, the Crusher, and the Sanctifying, because it purifies people from sins and other things.Regarding His saying, "and whoever enters it is safe" [Al Imran 3:97], Ibn Abbas said, concerning the words of Allah Most High, "and whoever enters it is safe" [Al Imran 3:97], that it means whoever seeks refuge in the House, the House grants him refuge, but he is not given shelter, nor fed, nor given drink, so that when he leaves, he is held to account for his wrongdoing.And His saying, "And it is a duty owed to Allah by the people to perform pilgrimage to the House, for whoever is able to find a way there" [Al Imran 3:97].