Abu Hurairah reported,

A 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 reporting from a hadith of the Messenger of Allah ﷺ, so this kept us from asking Abu Hurairah to confirm the source of that hadith. Then when Abu Hurairah died, we recalled 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 this state, Abdullah bin Ibrahim bin Qariz sat with us, so we mentioned that hadith and how we had failed to obtain explicit confirmation from Abu Hurairah."Abdullah bin Ibrahim said to us, "I bear witness that I heard Abu Hurairah say, 'The Messenger of Allah ﷺ said, For I am the last of the prophets, and it is the last of the mosques.'"

Nasai 695

Sahih

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

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

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

النسائي 695صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Mosques
Chapter
Virtue of the masjid of the Prophet ﷺ and prayer therein
Numbering
Darussalam 695
Nasai 695