I heard the Messenger of Allah ﷺ say openly, not in secret, "The family of so-and-so, meaning a certain person, are not my allies. My ally is only Allah and the righteous believers."In Bukhari's narration, "But they have ties of kinship which I will moisten with their due moisture," meaning he would maintain those ties through kindness.
سمعت رسول الله ﷺ جهارا غير سر، يقول: ألا إن آل أبي فلان، يعني فلانا، ليسوا لي بأولياء، إنما وليي الله وصالح المؤمنين. وفي رواية البخاري: ولكن لهم رحم أبلها ببلالها يعني أصلها بصلتها.
Bukhari narrated it in the Book of Manners (5990), and Muslim in the Book of Faith (215), both through Muhammad bin Jafar, who said, Shubah narrated to us, from Ismail bin Abu Khalid, from Qays, from Amr bin As, who said, and he mentioned it. The wording given is that of Muslim, and Bukhari's wording is similar. Bukhari added afterward, Anbasah bin Abdul-Wahid added, from Bayan, from Qays, from Amr bin As, who said, I heard the Messenger of Allah ﷺ say, and he mentioned the addition.