Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:21368Abū Bakr Aḥmad b. ʿAlī > Ibrāhīm b. ʿAbdullāh al-Aṣbahānī > Ismāʿīl b. Ibrāhīm al-Qaṭṭān > al-Ḥasan b. ʿĪsá > Ibn al-Mubārak > Ibn Jurayj

[Machine] I asked 'Ata who was a free man and had married a slave woman, and she became pregnant from him. So I freed her and her child was still in her womb. To whom does the child belong?' He said, 'The one who emancipated him, but his inheritance belongs to his father.' And this is because a relative takes precedence over a master in inheritance.  

البيهقي:٢١٣٦٨أَخْبَرَنَا أَبُو بَكْرٍ أَحْمَدُ بْنُ عَلِيٍّ أنبأ إِبْرَاهِيمُ بْنُ عَبْدِ اللهِ الْأَصْبَهَانِيُّ أنبأ إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ الْقَطَّانُ ثنا الْحَسَنُ بْنُ عِيسَى أنبأ ابْنُ الْمُبَارَكِ أنبأ ابْنُ جُرَيْجٍ قَالَ

قُلْتُ لِعَطَاءٍ حُرٌّ تَزَوَّجَ أَمَةً لِي فَحَمَلَتْ مِنْهُ فَأَعْتَقْتُ وَلَدَهَا فِي بَطْنِهَا لِمَنْ وَلَاؤُهُ؟ قَالَ لِلَّذِي أَعْتَقَهُ لَكِنَّ مِيرَاثَهُ لِأَبِيهِ وَهَذَا لِأَنَّ النَّسِيبَ يَتَقَدَّمُ الْمَوْلَى فِي الْمِيرَاثِ