It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "A man who believes in Allah and His Messenger cannot hate the Ansar, and whoever hates them, Allah and His Messenger will hate him."
In the narration of Imam Ahmad (may Allah have mercy on him) it is (as follows): "and His Messenger", or "except that Allah and His Messenger will hate him."
Hadith Referenceالأحاديث المختارة / عبد الله بن عباس بن عبد المطلب / 3597
Hadith Takhrij«أخرجه الضياء المقدسي فى الأحاديث المختارة برقم: 3598، 3599، 3711، والنسائي فى السنن الكبرى برقم: 8294، والترمذي فى جامعه برقم: 4291، وأحمد فى مسنده برقم: 2845، وأبو يعلى فى مسنده برقم: 2698، والبزار فى مسنده برقم: 5033، وابن أبي شيبة فى مصنفه برقم: 33040، والطبراني فى الكبير برقم: 11343، 12371»