Aisha said that Barirah came to seek her help in the writing of her emancipation. ʿAisha said to her, "If you wish, I will pay your masters (your price) and the wala' will be for me." When Messenger of Allah ﷺ came, she told him about it. The Prophet ﷺ said to her, "Buy her (i.e. Barirah) and manumit (free) her, for the Wala is for the one who manumits." Then Messenger of Allah ﷺ ascended the pulpit and said, "What about those people who stipulate conditions which are not in Allah's Laws? Whoever stipulates such conditions as are not in Allah's Laws, then those conditions are invalid even if he stipulated a hundred such conditions."
إِنْ شِئْتِ أَعْطَيْتُ أَهْلَكِ وَيَكُونُ الْوَلاَءُ لِي فَلَمَّا جَاءَ رَسُولُ اللَّهِ ﷺ ذَكَّرْتُهُ ذَلِكَ قَالَ النَّبِيُّ ﷺ ابْتَاعِيهَا فَأَعْتِقِيهَا فَإِنَّمَا الْوَلاَءُ لِمَنْ أَعْتَقَ ثُمَّ قَامَ رَسُولُ اللَّهِ ﷺ عَلَى الْمِنْبَرِ فَقَالَ مَا بَالُ أَقْوَامٍ يَشْتَرِطُونَ شُرُوطًا لَيْسَتْ فِي كِتَابِ اللَّهِ مَنِ اشْتَرَطَ شَرْطًا لَيْسَ فِي كِتَابِ اللَّهِ فَلَيْسَ لَهُ وَإِنِ اشْتَرَطَ مِائَةَ شَرْطٍ