Sahih Muslim Book 009, Hadith Number 3587.
Chapter: The right of inheritance of property vests with one who emancipates the slave.
'Aisha (Allah be pleased with her) reported: Barira came to me and said: My family (owners) have made contract with me (for granting freedom) for nine 'uqiyas (of silver) payable in nine years, one 'uqiya every year. Help me (in making this payment). I said to her: If your family so desires, I am prepared to make them the full payment in one installment, and thus secure freedom for you, but the right of inheritance will vest in me, if I do so. She (Barira) made a mention of that to her family, but they refused (except) on the condition that the right of inheritance would vest in them. She came to me and made mention of if She ('Aisha) said: I scolded her. She (Barira) said: By Allah, it is not possible (they will never agree to it). And as she was saying it, Allah's messenger (may peace be upon him) heard, and he asked me, I informed him and he said: Buy her and emancipate her, and let the right of inheritance vest in them, for they cannot claim it (rightfully) since the right of inheritance vests with one who emancipates (the slave; therefore, these people have no right to lay such false claims). And I did so. She ('Aisha) said: Then Allah's Messenger (may peace be upon him) delivered a sermon in the evening. He extolled Allah and praised Him with what He deserves, and then said afterwards,: What has happened to the people that they lay down conditions which are not found in the Book of Allah? And the condition which is not found in the Book of Allah is invalid, even if its number is one hundred. The Book of Allah is more true (than any other deed) and the condition laid down by Allah is more binding (than any other condition). What has happened to the people among you that someone among you says: "Emancipate so and so, but the right of inheritance vests in me"? Verily, the right of inheritance vests in one who emancipates.