Aisha said, "Barira came to me and said, 'I have agreed with my masters to pay them nine Uqiyas (of gold) (in installments) one Uqiya per year; please help me.' I said, 'I am ready to pay the whole amount now provided your masters agree that your Wala' will be for me.' So, Barira went to her masters and told them about that offer but they refused to accept it. She returned, and at that time, Messenger of Allah ﷺ was sitting (present). Barira said, 'I told them of the offer but they did not accept it and insisted on having the Wala'.' The Prophet ﷺ heard that." ʿAisha narrated the whole story to the Prophet. He said to her, "Buy her and stipulate that her Wala' would be yours as the Wala' is for the manumitter." ʿAisha did so. Then Messenger of Allah ﷺ stood up in front of the people, and after glorifying Allah he said, "Amma Baʿdu (i.e. then after)! What about the people who impose conditions which are not in Allah's Book (Laws)? Any condition that is not in Allah's Book (Laws) is invalid even if they were one hundred conditions, for Allah's decisions are the right ones and His conditions are the strong ones (firmer) and the Wala' will be for the manumitter." (Using translation from Bukhārī 2168)
إِنِّي كَاتَبْتُ أَهْلِي عَلَى تِسْعِ أَوَاقٍ فِي كُلِّ عَامٍ أُوقِيَّةٌ فَأَعِينِينِي فَقَالَتْ عَائِشَةُ إِنْ أَحَبَّ أَهْلُكِ أَنْ أَعُدَّهَا لَهُمْ عَدَدْتُهَا لَهُمْ وَيَكُونُ لِي وَلَاؤُكِ فَذَهَبَتْ بَرِيرَةُ إِلَى أَهْلِهَا فَقَالَتْ لَهُمْ ذَلِكَ فَأَبَوْا عَلَيْهَا فَجَاءَتْ مِنْ عِنْدِ أَهْلِهَا وَرَسُولُ اللَّهِ ﷺ جَالِسٌ فَقَالَتْ إِنِّي قَدْ عَرَضْتُ عَلَيْهِمْ ذَلِكَ فَأَبَوْا إِلَّا أَنْ يَكُونَ الْوَلَاءُ لَهُمْ فَسَمِعَ رَسُولَ اللَّهِ ﷺ فَسَأَلَهَا فَأَخْبَرْتُهُ عَائِشَةُ فَقَالَ رَسُولُ اللَّهِ ﷺ «خُذِيهَا وَاشْتَرِطِي لَهُمُ الْوَلَاءَ فَإِنَّمَا الْوَلَاءُ لِمَنْ أَعْتَقَ» قَالَتْ عَائِشَةُ ثُمَّ قَامَ رَسُولُ اللَّهِ ﷺ فِي النَّاسِ فَحَمِدَ اللَّهَ وَأَثْنَى عَلَيْهِ ثُمَّ قَالَ «أَمَا بَعْدُ مَا بَالُ رِجَالٍ يَشْتَرِطُونَ شُرُوطًا لَيْسَتْ فِي كِتَابِ اللَّهِ مَا كَانَ مِنْ شَرْطٍ لَيْسَ فِي كِتَابِ اللَّهِ فَهُوَ بَاطِلٌ وَإِنْ كَانَ مِائَةُ شَرْطٍ قَضَاءُ اللَّهِ أَحَقُّ وَشَرْطُ اللَّهِ أَوْثَقُ وَإِنَّمَا الْوَلَاءُ لِمَنْ أَعْتَقَ»