Anas bin Malik reported,

On the day of Hunayn, Hawazin met the Prophet ﷺ, who had with him ten thousand men along with the Tulaqa, those who had been freed at the conquest of Makkah. The Muslims turned and fled.The Prophet ﷺ called out, "Company of the Ansar!"They answered, "At your service, Messenger of Allah, and at your pleasure. We are here before you."The Prophet ﷺ dismounted and said, "I am the servant of Allah and His Messenger."The polytheists were then routed. He gave shares of the spoils to the Tulaqa and the Muhajirun but gave the Ansar nothing. So they spoke about it, and he summoned them and gathered them inside a tent. He said, "Are you not pleased that the people go off with sheep and camels while you go off with the Messenger of Allah ﷺ?"The Prophet ﷺ then said, "If the people were to travel through one valley and the Ansar through a mountain pass, I would choose the pass of the Ansar."

Bukhari 4333

Sahih

حدثنا علي بن عبد الله حدثنا أزهر عن ابن عون أنبأنا هشام بن زيد بن أنس

عن أنس رضي الله عنه قال

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

البخاري 4333صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Expedition of Taif in Shawwal, year eight
Numbering
Darussalam 4333
Bukhari 4333