Abu Hurairah reported,

A single prayer in the mosque of the Messenger of Allah ﷺ is better than a thousand prayers in any other mosque except the Sacred Mosque, for the Messenger of Allah ﷺ is the last of the prophets and his mosque is the last of the mosques.Abu Salama and Abu Abdullah said, "We had no doubt that Abu Hurairah was relating this from a hadith of the Messenger of Allah ﷺ, and that is what kept us from asking Abu Hurairah to confirm the hadith. But when Abu Hurairah passed away, we discussed the matter and blamed one another for not having spoken to Abu Hurairah about it so that he might trace it back to the Messenger of Allah ﷺ, if indeed he had heard it from him. While we were in that state, Abdullah bin Ibrahim bin Qariz sat with us, so we mentioned that hadith and how we had fallen short in not getting Abu Hurairah to state it explicitly. Abdullah bin Ibrahim said to us, 'I bear witness that I heard Abu Hurairah say that the Messenger of Allah ﷺ said, "For I am the last of the prophets and my mosque is the last of the mosques."'"

Muslim 3376

Sahih

حدثني إسحق بن منصور حدثنا عيسى بن المنذر الحمصي حدثنا محمد بن حرب حدثنا الزبيدي عن الزهري عن أبي سلمة بن عبد الرحمن وأبي عبد الله الأغر مولى الجهنيين وكان من أصحاب أبي هريرة أنهما سمعا

أبا هريرة يقول

ا صلاة في مسجد رسول الله ﷺ أفضل من ألف صلاة فيما سواه من المساجد إلا المسجد الحرام فإن رسول الله ﷺ آخر الأنبياء وإن مسجده آخر المساجد قال أبو سلمة وأبو عبد الله لم نشك أن أبا هريرة كان يقول عن حديث رسول الله ﷺ فمنعنا ذلك أن نستثبت أبا هريرة عن ذلك الحديث حتى إذا توفي أبو هريرة تذاكرنا ذلك وتلاومنا أن لا نكون كلمنا أبا هريرة في ذلك حتى يسنده إلى رسول الله ﷺ إن كان سمعه منه فبينا نحن على ذلك جالسنا عبد الله بن إبراهيم بن قارظ فذكرنا ذلك الحديث والذي فرطنا فيه من نص أبي هريرة عنه فقال لنا عبد الله بن إبراهيم أشهد أني سمعت أبا هريرة يقول قال رسول الله ﷺ فإني آخر الأنبياء وإن مسجدي آخر المساجد

مسلم 3376صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Hajj
Chapter
Virtue of prayer in the mosques of Makkah and Madinah
Numbering
Darussalam 3376
Muslim 3376