Language:
كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(56)
Chapter: The Ghazwa of At-Taif
(56)
باب غَزْوَةُ الطَّائِفِ فِي شَوَّالٍ سَنَةَ ثَمَانٍ
Sahih al-Bukhari 4333

Narrated Anas:

When it was the day of (the battle of) Hunain, the Prophet (ﷺ) confronted the tribe of Hawazin while there were ten-thousand (men) besides the Tulaqa' (i.e. those who had embraced Islam on the day of the Conquest of Mecca) with the Prophet. When they (i.e. Muslims) fled, the Prophet (ﷺ) said, "O the group of Ansari" They replied, "Labbaik, O Allah's Messenger (ﷺ) and Sadaik! We are under your command." Then the Prophet (ﷺ) got down (from his mule) and said, "I am Allah's Slave and His Apostle." Then the pagans were defeated. The Prophet (ﷺ) distributed the war booty amongst the Tulaqa and Muhajirin (i.e. Emigrants) and did not give anything to the Ansar. So the Ansar spoke (i.e. were dissatisfied) and he called them and made them enter a leather tent and said, Won't you be pleased that the people take the sheep and camels, and you take Allah's Messenger (ﷺ) along with you?" The Prophet (ﷺ) added, "If the people took their way through a valley and the Ansar took their way through a mountain pass, then I would choose a mountain pass of the Ansar."

حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا أَزْهَرُ، عَنِ ابْنِ عَوْنٍ، أَنْبَأَنَا هِشَامُ بْنُ زَيْدِ بْنِ أَنَسٍ، عَنْ أَنَسٍ ـ رضى الله عنه ـ قَالَ لَمَّا كَانَ يَوْمَ حُنَيْنٍ الْتَقَى هَوَازِنُ وَمَعَ النَّبِيِّ صلى الله عليه وسلم عَشَرَةُ آلاَفٍ وَالطُّلَقَاءُ فَأَدْبَرُوا قَالَ ‏"‏ يَا مَعْشَرَ الأَنْصَارِ ‏"‏‏.‏ قَالُوا لَبَّيْكَ يَا رَسُولَ اللَّهِ وَسَعْدَيْكَ، لَبَّيْكَ نَحْنُ بَيْنَ يَدَيْكَ، فَنَزَلَ النَّبِيُّ صلى الله عليه وسلم فَقَالَ ‏"‏ أَنَا عَبْدُ اللَّهِ وَرَسُولُهُ ‏"‏‏.‏ فَانْهَزَمَ الْمُشْرِكُونَ، فَأَعْطَى الطُّلَقَاءَ وَالْمُهَاجِرِينَ وَلَمْ يُعْطِ الأَنْصَارَ شَيْئًا فَقَالُوا، فَدَعَاهُمْ فَأَدْخَلَهُمْ فِي قُبَّةٍ فَقَالَ ‏"‏ أَمَا تَرْضَوْنَ أَنْ يَذْهَبَ النَّاسُ بِالشَّاةِ وَالْبَعِيرِ، وَتَذْهَبُونَ بِرَسُولِ اللَّهِ صلى الله عليه وسلم ‏"‏، فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏"‏لَوْ سَلَكَ النَّاسُ وَادِيًا وَسَلَكَتِ الأَنْصَارُ شِعْبًا لاَخْتَرْتُ شِعْبَ الأَنْصَارِ ‏"‏
Reference : Sahih al-Bukhari 4333
In-book reference : Book 64, Hadith 362
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 622
  (deprecated numbering scheme)