← Sahih al-Bukhari
Sahih al-Bukhari · Hadith #6516 · Laws of Inheritance (Al-Faraa'id)

Narrated Anas bin Malik:

حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا مُعَاوِيَةُ بْنُ قُرَّةَ، وَقَتَادَةُ، عَنْ أَنَسِ بْنِ مَالِكٍ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ مَوْلَى الْقَوْمِ مِنْ أَنْفُسِهِمْ ‏"‏‏.‏ أَوْ كَمَا قَالَ‏.‏

The Prophet (ﷺ) said, "The freed slave belongs to the people who have freed him," or said something
similar.