Abdullah bin Umar reported,

Ayesha, Umm Muiminin, wanted to buy a Jariya in order to set her free. Her owners said, "We will sell her to you on the condition that her right of guardianship remains with us." She mentioned this to the Messenger of Allah ﷺ, who said, "Do not let that stop you, for the right of guardianship belongs only to the one who sets the slave free."

Bukhari 6757

Sahih

حدثنا قتيبة بن سعيد عن مالك عن نافع

عن ابن عمر

أن عائشة أم المؤمنين أرادت أن تشتري جارية تعتقها فقال أهلها نبيعكها على أن ولاءها لنا فذكرت ذلك لرسول الله ﷺ فقال لا يمنعك ذلك فإنما الولاء لمن أعتق

البخاري 6757صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Obligatory duties
Chapter
If someone accepts Islam at his hands
Numbering
Darussalam 6757
Bukhari 6757