Ayesha reported,

Ayesha reported that Barirah came to her and said, "I have made an agreement with my masters to buy my freedom for nine ounces of silver, one ounce each year, so help me."Ayesha said, "If your masters are willing for me to pay the entire amount to them on your behalf at once, I will do so, and your loyalty will be mine."Barirah went to her masters and proposed this to them, but they refused. She returned from them while the Messenger of Allah ﷺ was sitting there, and she said to Ayesha, "I offered them what you suggested, but they refused unless the loyalty belongs to them."The Messenger of Allah ﷺ heard this and asked Ayesha about it, so she informed him. The Messenger of Allah ﷺ said, "Take her, and let them stipulate the loyalty as they wish, for loyalty belongs only to the one who frees the slave."Ayesha did so. Then the Messenger of Allah ﷺ stood among the people, praised Allah and extolled Him, then said, "What is the matter with some men who impose conditions not found in the Book of Allah? Any condition that is not in the Book of Allah is invalid, even if it be a hundred conditions. The judgment of Allah is more deserving, and the condition of Allah is more binding. Loyalty belongs only to the one who frees the slave."

Azami 6145

Sahih

عن عائشة زوج النبي ﷺ

أنها قالت: جاءت بريرة، فقالت: إني كاتبت أهلي على تسع أواق، في كل عام أوقية، فأعينيني، فقالت عائشة: إن أحب أهلك أن أعدها لهم عنك عددتها، ويكون لي ولاؤك، فعلت. فذهبت بريرة إلى أهلها، فقالت لهم ذلك، فأبوا عليها، فجاءت من عند أهلها ورسول الله ﷺ جالس، فقالت لعائشة: إني قد عرضت عليهم ذلك، فأبوا علي إلا أن يكون الولاء لهم، فسمع ذلك رسول الله ﷺ، فسألها، فأخبرته عائشة، فقال رسول الله ﷺ: خذيها، واشترطي لهم الولاء، فإنما الولاء لمن أعتق. ففعلت عائشة، ثم قام رسول الله ﷺ في الناس، فحمد الله، وأثنى عليه، ثم قال: أما بعد، فما بال رجال يشترطون شروطا ليست في كتاب الله، ما كان من شرط ليس في كتاب الله فهو باطل، وإن كان مائة شرط، قضاء الله أحق، وشرط الله أوثق، وإنما الولاء لمن أعتق.

الأعظمي 6145صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Emancipation of slaves
Section
Authority of patronage belongs only to the one who emancipates
Numbering
Jami al-Kamil 6145 (2nd edition)
Azami 6145