"And those with whom you have made a pact, give them their share. Indeed, Allah is Witness over all things" [Nisa 4:33]. A man used to make a pact of alliance with another man to whom he had no ties of kinship, and each would inherit from the other. This was then abrogated by Surah Anfal, where Allah Almighty said, "And those related by blood are nearer to one another" [Anfal 8:75].
{والذين عقدت أيمنكم فءاتوهم نصيبهم إن الله كان على كل شيء شهيدا} [النساء: ٣٣]، كان الرجل يحالف الرجل ليس بينهما نسب، فيرث أحدهما الآخر، فنسخ ذلك الأنفال. قال تعالى: {وأولوا الأرحام بعضهم أولى ببعض}
Abu Dawud (2921) narrated it from Ahmad bin Muhammad bin Thabit, who said, my father told me, on the authority of Ali bin Husayn, from his father, from Yazid the grammarian, from Ikrima, from Ibn Abbas, and he mentioned it. Its chain is hasan due to the discussion concerning Ali bin Husayn bin Waqid Marwazi, for there is disagreement about him, though his hadith is hasan when he does not report something that is rejected against him.What has been abrogated is inheritance through an alliance of oath-taking. As for making a pact of mutual support in obedience to Allah, in helping the wronged, and in brotherhood for the sake of Allah, this is something desirable, and commands to do so have come in many hadiths.