كتاب فضائل الصحابة رضى الله تعالى عنهم
44  
The Book of the Merits of the Companions
(43)
Chapter: The Virtues Of The Ansar (RA)
(43)
باب مِنْ فَضَائِلِ الأَنْصَارِ رضى الله تعالى عنهم ‏‏
Sahih Muslim 2505

Jabir b. Abdullah reported that it was concerning them (the Ansar) that this verse was revealed, that when the two groups amongst you were about to lose heart and Allah was the Guardian of them both. This concerned Banu Salama and Banu Haritha and we did not like that Allah, the Exalted and Glorious, should not have revealed this verse for the fact that Allah (gave an assurance) of being the Guardian of both.

حَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ الْحَنْظَلِيُّ، وَأَحْمَدُ بْنُ عَبْدَةَ، - وَاللَّفْظُ لإِسْحَاقَ - قَالاَ أَخْبَرَنَا سُفْيَانُ، عَنْ عَمْرٍو، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، قَالَ فِينَا نَزَلَتْ ‏{‏ إِذْ هَمَّتْ طَائِفَتَانِ مِنْكُمْ أَنْ تَفْشَلاَ وَاللَّهُ وَلِيُّهُمَا‏}‏ بَنُو سَلِمَةَ وَبَنُو حَارِثَةَ وَمَا نُحِبُّ أَنَّهَا لَمْ تَنْزِلْ لِقَوْلِ اللَّهِ عَزَّ وَجَلَّ ‏{‏ وَاللَّهُ وَلِيُّهُمَا‏}‏ ‏.‏
Reference : Sahih Muslim 2505
In-book reference : Book 44, Hadith 243
USC-MSA web (English) reference : Book 31, Hadith 6098
  (deprecated numbering scheme)