I said, “Messenger of Allah, which of the two mosques is the one that was founded upon God-fearingness?” He took a handful of pebbles, struck them against the ground and said, “This one—this mosque of Madinah (yet there is much good in the other as well).”
The ḥadith is transmitted from him through a number of routes:
1 – Yaḥyā ibn Saʿīd narrates from Ḥumayd al-Kharrāṭ, who said: “I heard Abū Salamah ibn ʿAbd al-Raḥmān say: ʿAbd al-Raḥmān ibn Abī Saʿīd al-Khudrī passed by me, so I asked him, ‘How did you hear your father speak about the mosque that was founded upon God-fearingness?’ He replied, ‘My father said: I went in to the Messenger of Allah ﷺ in the house of one of his wives and asked…’” and he related the rest of the report. It was recorded by Aḥmad (3/24) and Muslim (4/126) through this chain.
Al-Nasāʾī (1/113), al-Tirmidhī (2/185, Būlāq ed.), and Aḥmad (3/8/89) also narrated it via Layth ibn Saʿd, from ʿImrān ibn Abī Anas, from Ibn Abī Saʿīd al-Khudrī, who said: “Two men argued about the mosque that was founded upon God-fearingness from the very first day. One said, ‘It is the Mosque of Qubāʾ,’ while the other said, ‘It is the Mosque of the Messenger of Allah ﷺ.’ The Messenger of Allah ﷺ declared, ‘It is this mosque of mine.’” Al-Tirmidhī remarked, “A hadith that is good and sound.”
Al-Ḥākim (2/334) likewise reported it through the route of Usāmah ibn Zayd, from ʿAbd al-Raḥmān ibn Abī Saʿīd, from his father, who said: “The mosque that was founded upon God-fearingness is the Mosque of the Messenger of Allah ﷺ.”