كتاب الإيمان
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 78

Zirr reported:

'Ali observed: By Him Who split up the seed and created something living, the Apostle (may peace and blessings be upon him) gave me a promise that no one but a believer would love me, and none but a hypocrite would nurse grudge against me.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا وَكِيعٌ، وَأَبُو مُعَاوِيَةَ عَنِ الأَعْمَشِ، ح وَحَدَّثَنَا يَحْيَى بْنُ يَحْيَى، - وَاللَّفْظُ لَهُ - أَخْبَرَنَا أَبُو مُعَاوِيَةَ، عَنِ الأَعْمَشِ، عَنْ عَدِيِّ بْنِ ثَابِتٍ، عَنْ زِرٍّ، قَالَ قَالَ عَلِيٌّ وَالَّذِي فَلَقَ الْحَبَّةَ وَبَرَأَ النَّسَمَةَ إِنَّهُ لَعَهْدُ النَّبِيِّ الأُمِّيِّ صلى الله عليه وسلم إِلَىَّ أَنْ لاَ يُحِبَّنِي إِلاَّ مُؤْمِنٌ وَلاَ يُبْغِضَنِي إِلاَّ مُنَافِقٌ ‏.‏
Reference : Sahih Muslim 78
In-book reference : Book 1, Hadith 146
USC-MSA web (English) reference : Book 1, Hadith 141
  (deprecated numbering scheme)