(1) The Book of Faith
كتاب الإيمان
(33) Chapter: Evidence that love of the Ansar and Ali (r.a.) is a part of faith and a sign thereof; Hating them is a sign of hypocrisy
(33) باب الدَّلِيلِ عَلَى أَنَّ حُبَّ الأَنْصَارِ وَعَلِيٍّ رَضِيَ اللَّهُ عَنْهُمْ مِنَ الإِيمَانِ وَعَلاَمَاتِهِ وَبُغْضَهُمْ مِنْ عَلاَمَاتِ النِّفَاقِ
Sahih Muslim 76 

It is reported on the authority of Abu Huraira that the Messenger of Allah (may peace and blessings be upon him) said:

A person who believes in Allah and the Last Day never nurses a grudge against the Ansar.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا يَعْقُوبُ، - يَعْنِي ابْنَ عَبْدِ الرَّحْمَنِ الْقَارِيَّ - عَنْ سُهَيْلٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ يُبْغِضُ الأَنْصَارَ رَجُلٌ يُؤْمِنُ بِاللَّهِ وَالْيَوْمِ الآخِرِ ‏"‏ ‏.‏
Reference : Sahih Muslim 76
In-book reference : Book 1, Hadith 144
USC-MSA web (English) reference : Book 1, Hadith 139
  (deprecated numbering scheme)