Narrated Ibn 'Abbas:
Regarding the Verse: "To everyone, We have appointed heirs." (4.33) 'Mawali' means heirs. And regarding:-- "And those to whom your right hands have pledged." When the Emigrants came to Medina, an Emigrant used to be the heir of an Ansari with the exclusion of the latter's relatives, and that was because of the bond of brotherhood which the Prophet had established between them (i.e. the Emigrants and the Ansar). So when the Verses:-- "To everyone We have appointed heirs." was revealed, (the inheritance through bond of brotherhood) was cancelled. Ibn Abbas then said: "And those to whom your right hands have pledged." is concerned with the covenant of helping and advising each other. So allies are no longer to be the heir of each other, but they can bequeath each other some of their property by means of a will.
Sahih al-Bukhari, Vol. 6, Book of Prophetic Commentary on the Qur'an, Hadith 104
Sahih al-Bukhari, Book of Prophetic Commentary on the Qur'an, Hadith 104