Two men disputed in the mosque about the mosque which was founded on piety from the very first day. One man said, "It is the mosque of Quba."The other said, "It is the mosque of the Messenger of Allah ﷺ."The Messenger of Allah ﷺ said, "It is this mosque of mine."
حدثنا قتيبة حدثنا الليث عن عمران بن أبي أنس عن عبد الرحمن بن أبي سعيد
تمارى رجلان في المسجد الذي أسس على التقوى من أول يوم فقال رجل هو مسجد قباء وقال الآخر هو مسجد رسول الله ﷺ فقال رسول الله ﷺ هو مسجدي هذا
Its isnad is sahih. Ahmad reported it, 30/89, and Nasai, 2/36, hadith 698, from Qutayba with the same wording. Muslim also reported it, hadith 1398, from the hadith of Abdul-Rahman bin Abu Saeed. The hadith of Anas bin Abu Yahya from his father has already appeared at 323.