It is established in the two Ṣaḥīḥ collections that the Prophet ﷺ used to visit Qubāʾ every Saturday, sometimes mounted and sometimes on foot. He did so because Allah revealed, “A mosque founded on God-consciousness from the very first day is worthier that you stand therein” [9:108], and his own mosque was the one most entitled to that description. It is also authentically reported that, when he was asked about “the mosque founded on God-consciousness,” he replied, “It is this mosque of mine,” meaning that his mosque embodies that quality more perfectly than the Mosque of Qubāʾ. Nonetheless, the Mosque of Qubāʾ was also founded on God-consciousness, and for its sake the verse was revealed. Hence Allah says, “Within it are men who love to purify themselves, and Allah loves those who purify themselves” [9:108].
The people of Qubāʾ, in addition to performing wuḍūʾ (ritual ablution) and ghusl (ritual bathing), would cleanse themselves with water after relieving themselves—a practice they had learned from their Jewish neighbors, whereas most Arabs did not do so. The Prophet ﷺ therefore wished to prevent anyone from supposing that the mosque founded on God-consciousness was other than his own; accordingly, he declared that his mosque was even more deserving of that designation. Thus, the words “a mosque founded on God-consciousness” [9:108] encompass his mosque, the Mosque of Qubāʾ, and indeed every mosque erected on piety, in contrast to the mosques built for harm.
Al-Ḥāfiẓ Ibn Ḥajar adopted this reconciling view and quoted similar explanations from al-Dāwūdī, al-Suhaylī, and others. This is the correct position that must be followed, for abandoning either what the Qur’an conveys because of a hadith, or the hadith because of the Qur’an, is an error—indeed, misguidance. The Messenger of Allah ﷺ said, “Verily, I have been given the Qur’an and something like it along with it.”
Further evidence that the verse refers to the Mosque of Qubāʾ will be presented later.
(c) Then comes al-Masjid al-Aqṣā. Allah, Exalted is He, says, “Glory be to Him who took His servant by night…” and he ﷺ said, “Go to it and pray therein, for…"