Mishkat al-Masabih 2877
‘A'isha said Barira came telling her she had arranged to buy her freedom for nine uqiyas; one to be paid annually, and asking her to help her. ‘A’isha replied, “If your people are willing that I should count them out to them all at one time and set you free, I shall do so, and I shall have the right to inherit from you." She went to her people, but they insisted that the right to inherit from her should be theirs, so God’s Messenger said, “Take her and set her free." He then stood up among the people, and after praising and extolling God, he said, “To proceed:
What is the matter with people who make conditions which are not in God’s Book? Any condition which is not in God’s Book is worthless. Even if there are a hundred conditions, God’s decision is more valid and God's condition is more binding. The right of inheritance belongs only to the one who has set a person free.” 

(Bukhari and Muslim.)
وَعَنْ عَائِشَةَ قَالَتْ: جَاءَتْ بَرِيرَةُ فَقَالَتْ: إِنِّي كَاتَبْتُ عَلَى تِسْعِ أَوَاقٍ فِي كُلِّ عَامٍ وُقِيَّةٌ فَأَعِينِينِي فَقَالَتْ عَائِشَةُ: إِنْ أَحَبَّ أَهْلُكِ أَنْ أَعُدَّهَا لَهُمْ عُدَّةً وَاحِدَةً وَأُعْتِقَكِ فَعَلْتُ وَيَكُونُ وَلَاؤُكِ لِي فَذَهَبَتْ إِلَى أَهْلِهَا فَأَبَوْا إِلَّا أَنْ يَكُونَ الْوَلَاءُ لَهُمْ فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «خُذِيهَا وَأَعْتِقِيهَا» ثُمَّ قَامَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فِي النَّاسَ فَحَمِدَ اللَّهَ وَأَثْنَى عَلَيْهِ ثُمَّ قَالَ: «أَمَّا أبعد فَمَا بَالُ رِجَالٍ يَشْتَرِطُونَ شُرُوطًا لَيْسَتَ فِي كِتَابِ اللَّهِ مَا كَانَ مِنْ شَرْطٍ لَيْسَ فِي كِتَابِ اللَّهِ فَهُوَ بَاطِلٌ وَإِنْ كَانَ مِائَةَ شَرْطٍ فَقَضَاءُ اللَّهِ أَحَقُّ وَشَرْطُ اللَّهِ أَوْثَقُ وَإِنَّمَا الْوَلَاءُ لِمَنْ أَعْتَقَ»