I went to ʿAisha and said, "I was the slave of ʿUtba bin Abu Lahab. "Utba died and his sons became my masters who sold me to Ibn Abu ʿAmr who manumitted me. The sons of ʿUtba stipulated that my Wala' should be for them." ʿAisha said, "Barirah came to me and she was given the writing of emancipation by her masters and she asked me to buy and manumit her. I agreed to it, but Barirah told me that her masters would not sell her unless her Wala' was for them." ʿAisha said, "I am not in need of that." When the Prophet ﷺ heard that, or he was told about it, he asked ʿAisha about it. ʿAisha mentioned what Barirah had told her. The Prophet ﷺ said, "Buy and manumit (free) her and let them stipulate whatever they like." So, ʿAisha bought and manumitted her and her masters stipulated that her Wala' should be for them." The Prophet;, said, "The Wala' will be for the liberator even if they stipulated a hundred conditions."
فَسَمِعَ بِذَلِكَ النَّبِيُّ ﷺ أَوْ بَلَغَهُ فَذَكَرَ لِعَائِشَةَ فَذَكَرَتْ عَائِشَةُ مَا قَالَتْ لَهَا فَقَالَ اشْتَرِيهَا وَأَعْتِقِيهَا وَدَعِيهِمْ يَشْتَرِطُونَ مَا شَاءُوا فَاشْتَرَتْهَا عَائِشَةُ فَأَعْتَقَتْهَا وَاشْتَرَطَ أَهْلُهَا الْوَلاَءَ فَقَالَ النَّبِيُّ ﷺ الْوَلاَءُ لِمَنْ أَعْتَقَ وَإِنِ اشْتَرَطُوا مِائَةَ شَرْطٍ