Hadithcore
Sahih Muslim, 2507
sahih

Anas reported that Allah's Messenger (ﷺ) sought forgiveness for the Ansar and he said:

I think (he also sought forgiveness) for the children of the Ansar and the slaves and the freed men of the Ansar. I have no doubt about it.

حَدَّثَنِي أَبُو مَعْنٍ الرَّقَاشِيُّ، حَدَّثَنَا عُمَرُ بْنُ يُونُسَ، حَدَّثَنَا عِكْرِمَةُ، - وَهُوَ ابْنُ عَمَّارٍ - حَدَّثَنَا إِسْحَاقُ، - وَهُوَ ابْنُ عَبْدِ اللَّهِ بْنِ أَبِي طَلْحَةَ - أَنَّ أَنَسًا، حَدَّثَهُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم اسْتَغْفَرَ لِلأَنْصَارِ - قَالَ - وَأَحْسِبُهُ قَالَ ‏

‏ وَلِذَرَارِيِّ الأَنْصَارِ وَلِمَوَالِي الأَنْصَارِ ‏

‏ ‏.‏ لاَ أَشُكُّ فِيهِ ‏.‏

References2 variants
In-Book Reference
Book 44, Hadith 245
USC-MSA web (English) reference
Book 31, Hadith 6100 (deprecated numbering scheme)