Return to your people ; if you like that I make payment for the purchase of your freedom on your behalf and I shall have the right to inherit from you, I shall do so. Barirah mentioned it to her people, but they refused and said: If she wants to purchase your freedom for reward from Allah, she may do so, but the right to inherit from her shall be ours. She mentioned it to the Messenger of Allah ﷺ. The Messenger of Allah ﷺ said: Purchase her (freedom) and set her free, for the right of inheritance belongs to only to the one who set a person free. The Messenger of Allah ﷺ then stood up and said: If anyone makes a condition which is not in Allah's Book, he has no right to it, even if he stipulates it hundred times. Allah's condition is more valid and binding.
أَنَّ بَرِيرَةَ جَاءَتْ عَائِشَةَ تَسْتَعِينُهَا فِي كِتَابَتِهَا وَلَمْ تَكُنْ قَضَتْ مِنْ كِتَابَتِهَا شَيْئًا فَقَالَتْ لَهَا عَائِشَةُ ارْجِعِي إِلَى أَهْلِكِ فَإِنْ أَحَبُّوا أَنْ أَقْضِيَ عَنْكِ كِتَابَتَكِ وَيَكُونَ وَلاَؤُكِ لِي فَعَلْتُ فَذَكَرَتْ ذَلِكَ بَرِيرَةُ لأَهْلِهَا فَأَبَوْا وَقَالُوا إِنْ شَاءَتْ أَنْ تَحْتَسِبَ عَلَيْكِ فَلْتَفْعَلْ وَيَكُونَ لَنَا وَلاَؤُكِ فَذَكَرَتْ ذَلِكَ لِرَسُولِ اللَّهِ ﷺ فَقَالَ لَهَا رَسُولُ اللَّهِ ﷺ ابْتَاعِي فَأَعْتِقِي فَإِنَّمَا الْوَلاَءُ لِمَنْ أَعْتَقَ ثُمَّ قَامَ رَسُولُ اللَّهِ ﷺ فَقَالَ مَا بَالُ أُنَاسٍ يَشْتَرِطُونَ شُرُوطًا لَيْسَتْ فِي كِتَابِ اللَّهِ مَنِ اشْتَرَطَ شَرْطًا لَيْسَ فِي كِتَابِ اللَّهِ فَلَيْسَ لَهُ وَإِنْ شَرَطَهُ مِائَةَ مَرَّةٍ شَرْطُ اللَّهِ أَحَقُّ وَأَوْثَقُ