I asked Anas bin Malik, "Has it reached you that the Messenger of Allah ﷺ said, 'There is no pact of alliance in Islam'?"Anas replied, "The Messenger of Allah ﷺ established a pact of alliance between Quraysh and the Ansar in my own house."
قلت لأنس بن مالك: أبلغك أن رسول الله ﷺ قال: لا حلف في الإسلام فقال أنس: قد حالف رسول الله ﷺ بين قريش والأنصار في داري.
He narrated it in the chapter on suretyship (2294), and Muslim in the merits of the companions (2529), both from the hadith of Asim al-Ahwal, who said, I said to Anas bin Malik, "Has it reached you that the Messenger of Allah ﷺ said..." and he mentioned it.As for his statement, "The Messenger of Allah ﷺ made a pact of alliance..." if what was meant by it was the alliance of mutual inheritance, then it is abrogated by the words of Allah Most High, "And blood relatives are more entitled to inherit from one another" [Anfal 8:75]. But if what was meant by it was brotherhood, mutual support in religion, cooperation in righteousness and piety, and upholding what is right, then this remains valid until the Day of Resurrection.