Sahih al-Bukhari 2156
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِنَّمَا الْوَلاَءُ لِمَنْ أَعْتَقَ "
Narrated `Abdullah bin `Umar:
Aisha wanted to buy Buraira and he (the Prophet (ﷺ) ) went out for the prayer. When he returned, she told him that they (her masters) refused to sell her except on the condition that her Wala' would go to them. The Prophet (ﷺ) replied, 'The Wala' would go to him who manumits.' " Hammam asked Nafi` whether her (Buraira's) husband was a free man or a slave. He replied that he did not know.
Full reference and source
Sahih al-Bukhari 2156 In-book : Book 34, Hadith 107 USC-MSA web (English) : Vol. 3, Book 34, Hadith 365 (deprecated)
View source on Sunnah.com (opens in a new tab)