Sahih Bukhari | Volume 3 | Hadith Number 489

Ibn Abbas said, "In the verse: To every one We have appointed ' (Muwaliya Mawaliya means one's) heirs (4:33).' (And regarding the verse) 'And those with whom your right hands have made a pledge.' Ibn 'Abbas said, "When the emigrants came to the Prophet in Medina, the emigrant would inherit the Ansari while the latter's relatives would not inherit him because of the bond of brotherhood which the Prophet established between them (i.e. the emigrants and the Ansar). When the verse: 'And to everyone We have appointed heirs' (4:33) was revealed, it cancelled (the bond (the pledge) of brotherhood regarding inheritance)." Then he said, "The verse: To those also to whom your right hands have pledged, remained valid regarding co-operation and mutual advice, while the matter of inheritance was excluded and it became permissible to assign something in one's testament to the person who had the right of inheriting before.