Sunan an-Nasa'i, Volume 3, Book 23, Hadith 2615 (DarusSalam)

It was narrated from 'Aishah that: she wanted to buy Barirah and set her free, but they stipulated that her loyally as a freed slave (wala') should be to them. She mentioned that to the Messenger of Allah and he said: "Buy her and set her fee, and loyally is due to the one who frees the slave." She was given the choice when she was freed. Some meat was brought to the Messenger of Allah and it was said: "This is something that is given in charity to Barirah." He said: "It is charity for her and gift for us." And her husband was a free man.

أَخْبَرَنَا عَمْرُو بْنُ يَزِيدَ، قَالَ حَدَّثَنَا بَهْزُ بْنُ أَسَدٍ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ حَدَّثَنَا الْحَكَمُ، عَنْ إِبْرَاهِيمَ، عَنِ الأَسْوَدِ، عَنْ عَائِشَةَ، أَنَّهَا أَرَادَتْ أَنْ تَشْتَرِيَ، بَرِيرَةَ فَتَعْتِقَهَا وَأَنَّهُمُ اشْتَرَطُوا وَلاَءَهَا فَذَكَرَتْ ذَلِكَ لِرَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ ‏"‏ اشْتَرِيهَا وَاعْتِقِيهَا فَإِنَّ الْوَلاَءَ لِمَنْ أَعْتَقَ ‏"‏ ‏.‏ وَخُيِّرَتْ حِينَ أُعْتِقَتْ وَأُتِيَ رَسُولُ اللَّهِ صلى الله عليه وسلم بِلَحْمٍ فَقِيلَ هَذَا مِمَّا تُصُدِّقَ بِهِ عَلَى بَرِيرَةَ ‏.‏ فَقَالَ ‏"‏ هُوَ لَهَا صَدَقَةٌ وَلَنَا هَدِيَّةٌ ‏"‏ ‏.‏ وَكَانَ زَوْجُهَا حُرًّا ‏.‏

sunnah.com