Abu Hurairah reported,

The Messenger of Allah ﷺ stood in prayer and we stood with him. While in the prayer, an Arabi said, "Allah, have mercy on me and on Muhammad, and do not extend mercy to anyone else along with us."When the Prophet ﷺ concluded the prayer with the salam, he said to the Arabi, "You have restricted something vast," meaning the mercy of Allah.

Azami 13913

Sahih

عن أبي هريرة، قال

قام رسول الله ﷺ في صلاة وقمنا معه، فقال أعرابي وهو في الصلاة: اللهم ارحمني ومحمدا، ولا ترحم معنا أحدا، فلما سلم النبي ﷺ قال للأعرابي: لقد حجرت واسعا يريد رحمة الله.

الأعظمي 13913صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Noble character
Section
Mercy
Numbering
Jami al-Kamil 13913 (2nd edition)
Azami 13913