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

Narrated Anas:

The Prophet (ﷺ) gathered some people of Ansar and said, "The People of Quraish are still close to their Pre-lslamic period of ignorance and have suffered a lot, and I want to help them and attract their hearts (by giving them the war booty). Won't you be pleased that the people take the worldly things) and you take Allah's Messenger (ﷺ) with you to your homes?" They said, "Yes, (i.e. we are pleased with this distribution)." The Prophet (ﷺ) said, "'If the people took their way through a valley and the Ansar took their way through a mountain pass, then I would take the Ansar's valley or the Ansar's mountain pass."

حَدَّثَنِي مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا غُنْدَرٌ، حَدَّثَنَا شُعْبَةُ، قَالَ سَمِعْتُ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ ـ رضى الله عنه ـ قَالَ جَمَعَ النَّبِيُّ صلى الله عليه وسلم نَاسًا مِنَ الأَنْصَارِ، فَقَالَ ‏"‏ إِنَّ قُرَيْشًا حَدِيثُ عَهْدٍ بِجَاهِلِيَّةٍ وَمُصِيبَةٍ، وَإِنِّي أَرَدْتُ أَنْ أَجْبُرَهُمْ وَأَتَأَلَّفَهُمْ أَمَا تَرْضَوْنَ أَنْ يَرْجِعَ النَّاسُ بِالدُّنْيَا، وَتَرْجِعُونَ بِرَسُولِ اللَّهِ صلى الله عليه وسلم إِلَى بُيُوتِكُمْ ‏"‏‏.‏ قَالُوا بَلَى‏.‏ قَالَ ‏"‏ لَوْ سَلَكَ النَّاسُ وَادِيًا وَسَلَكَتِ الأَنْصَارُ شِعْبًا لَسَلَكْتُ وَادِيَ الأَنْصَارِ أَوْ شِعْبَ الأَنْصَارِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 4334
In-book reference : Book 64, Hadith 363
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 623
  (deprecated numbering scheme)