Al-Hakam bin Mina' (may Allah have mercy on him) narrates from Sayyiduna Yazid bin Jariyah al-Ansari (may Allah be pleased with him), who said: We were sitting around the throne of Sayyiduna Mu'awiyah (may Allah be pleased with him) when he came out to us and said: "What were you talking about?" They said: "We were talking about something concerning the Ansar." Mu'awiyah (may Allah be pleased with him) said: "Shall I not tell you another hadith that I heard from the Messenger of Allah (peace and blessings be upon him)?" They said: "Certainly, O Commander of the Believers!" He said: "I heard the Messenger of Allah (peace and blessings be upon him) say: 'Whoever loves the Ansar, Allah loves him; and whoever hates the Ansar, Allah hates him.'"
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 16767