To those also, to whom your right hand was pledged, give their due portion. A man made an agreement with another man (in early days of Islam), and there was no relationship between the ; one of them inherited from the other. The following verse of Surat Al-Anfal abrogated it: "But kindred by blood have prior right against each other." (Using translation from Abū Dāʾūd 2921)
{وَالَّذِينَ عَقَدَتَ أَيْمَانُكُمْ فَآتُوهُمْ نَصِيبَهُمْ} [النساء 33] كَانَ الرَّجُلُ يُحَالِفُ الرَّجُلَ لَيْسَ بَيْنَهُمَا نَسَبٌ فَيَرِثُ أَحَدُهُمَا الْآخَرُ فَنَسَخَ ذَلِكَ الْأَنْفَالُ فَقَالَ {وَأُولُو الْأَرْحَامِ بَعْضُهُمْ أَوْلَى بِبَعْضٍ} [الأحزاب 6]