Hisham bin Urwah narrates from his father, and he from Sayyidah Aishah (may Allah be pleased with her), that she said: Barirah (may Allah be pleased with her) came to me and said: I have made a contract of manumission (mukatabah) with my masters for nine uqiyahs, one uqiyah to be paid each year, so help me. Sayyidah Aishah (may Allah be pleased with her) said to her: "If your masters agree, I will pay this amount and the wala' will be mine." Barirah (may Allah be pleased with her) went and put this to her masters, but they refused. Barirah (may Allah be pleased with her) came back while the Prophet (peace and blessings be upon him) was also sitting there. Barirah (may Allah be pleased with her) told Sayyidah Aishah (may Allah be pleased with her) that they say the wala' will be theirs. The Prophet (peace and blessings be upon him) heard this too and asked Sayyidah Aishah (may Allah be pleased with her). When Sayyidah Aishah (may Allah be pleased with her) informed him, the Messenger of Allah (peace and blessings be upon him) said: "Buy her and make the condition of wala' for them, for wala' belongs only to the one who frees." So Sayyidah Aishah (may Allah be pleased with her) did so. Then the Messenger of Allah (peace and blessings be upon him) stood among the people and delivered a sermon, saying: "People make conditions that are not in the Book of Allah. Any condition that is not in the Book of Allah is void, even if there are a hundred conditions. The decree of Allah is more rightful and His condition is firmer, and wala' belongs to the one who frees."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الولاء / 21450