is neither convincing nor explicit, for what is meant is its very site—pre-ordained in Allah’s knowledge, established by His power, and held in veneration by the prophets from Adam up to Abraham (upon them be peace). We have already noted that Adam erected a dome over it, that the angels said to him, “We were circling this House before you,” and that the Ark circled it for forty days or so. All of these reports, however, come from Israelite sources, and we have explained that such material is neither affirmed nor denied and therefore carries no legal weight; if authentic revelation rejects it, it must be set aside. Allah, exalted is He, has said: “Indeed, the first House established for mankind is that at Bakkah…” (Āl ʿImrān 3:96).
A ḥadith does state that Adam (upon him be peace) was the first to build it, but the report is weak, as will be shown shortly.
Another difficulty has been raised about the Prophet’s words: “Between the two mosques—the Sacred Mosque and al-Masjid al-Aqsa—there are forty years,” for al-Aqsa was built by Solomon (upon him be peace), as the forthcoming ḥadith of ʿAbd Allah ibn ʿAmr indicates, and, according to the historians, more than a thousand years separate him from Abraham (upon him be peace). Moreover, as al-Ḥāfiẓ notes, the Qurʾan itself shows that David’s slaying of Goliath occurred long after Moses (upon him be peace).
Several answers have been suggested; the most plausible is that of al-Khaṭṭābī: “It appears that the foundations of al-Masjid al-Aqsa were first laid by one of Allah’s righteous servants before David and Solomon, after which David and Solomon enlarged and expanded it, so the construction was attributed to them.”
For the complete discussion and the remaining replies to this problem, see Fatḥ al-Bārī and al-Mirqāt.