I heard the Messenger of Allah ﷺ say in his sermon during the year of the Farewell Pilgrimage, "The child belongs to the marriage bed, and the adulterer gets the stone."
سمعت رسول الله ﷺ يقول في خطبة عام حجة الواداع: الولد للفراش وللعاهر الحجر.
Tirmidhi (2120), Abu Dawud (3565), Ibn Majah (2007), and Ahmad (22294) all narrated it from the hadith of Ismail bin Ayyash, who said, "Shurahbil bin Muslim told us, saying, 'I heard Abu Umama Bahili,'" and he related the hadith in a long context, which includes this portion, except that Abu Dawud did not mention it. Its chain is hasan because of the discussion surrounding Ismail bin Ayyash, for his narration from the people of Syria is more reliable and more sound, and this narration is one of those.On this subject there is also what has been narrated concerning the story of Rabah. He said, "My family married me to a Roman slave woman of theirs. I had intercourse with her, and she gave birth to a boy, black like me, whom I named Abdullah. Then I had intercourse with her again, and she gave birth to another boy, black like me, whom I named Ubaydullah. Then a Roman slave boy belonging to my family, called Yuhanna, took an interest in her and spoke to her secretly in his own language. She then gave birth to a boy who looked like a little lizard. I said to her, 'What is this?' She said, 'This is Yuhanna's.' So we brought the matter to Uthman."He said, "Uthman questioned the two of them, and they confessed. He said to them, 'Do you both agree that I should judge between you according to the judgment of the Messenger of Allah ﷺ? The Messenger of Allah ﷺ ruled that the child belongs to the marriage bed.'" I think he said that Uthman then had both of them flogged, since they were both slaves.Abu Dawud (2275), Ahmad (416), and Bukhari in Tarikh al-Kabir (3/315) all narrated it from the hadith of Mahdi bin Maymun, who said, "Muhammad bin Abdullah bin Abu Yaqub told us, from Hasan bin Saad, the freedman of Hasan bin Ali, from Rabah," and he related it. Its chain is daif because of Rabah, for he is "obscure." Ibn Abu Hatim gave him a biographical entry in Jarh wa Tadil (3/488) and said, "A man of Kufa, who narrated from Uthman bin Affan, and Hasan bin Saad narrated from him. I heard my father say that." Mizzi likewise mentioned him in Tahzib Kamal and said, "Ibn Hibban mentioned him in Thiqat." Ibn Hajar added in his Tahzib, "The rest of his statement was, 'I do not know who he is, nor whose son he is.'" This is a mistake on the part of Ibn Hajar, for the man about whom Ibn Hibban said in Thiqat (8/242), "Rabah, an elder who narrates from Ibn Mubarak, counted among the people of Kufa. Ibrahim bin Musa Farra narrated from him. I do not know him, nor his father. If he is not Rabah bin Khalid, then I do not know who he is," is a different man, later than the Rabah discussed here. Perhaps the one Mizzi intended dropped out of the manuscript of Ibn Hibban, or else this too is a mistake, just as Ibn Hajar's was. In any case, this Rabah remains among the obscure narrators.The jurisprudence of this chapter is as follows. It was among the customs of pre-Islamic times to attach lineage through fornication. They used to hire out slave women for intercourse, and if the slave woman acknowledged that the child belonged to a particular man, they would attach the child to him. Then Islam came and abolished that, and commanded that the child be attached to the marriage bed, as occurred in the dispute between Saad bin Abu Waqqas and Abd bin Zama bin Aswad over a child. This came about because Utba bin Abu Waqqas had intercourse with the slave woman of Zama bin Aswad, and she conceived and gave birth to a boy. When Utba's death approached, he charged his brother Saad to take this child and attach him to himself as his son. Utba then died as a polytheist. At that point Saad disputed with Abd bin Zama over the boy. Saad argued for attaching the boy to his brother Utba, following their custom of attaching a child born of fornication to its father, while Abd bin Zama held to his father's marriage bed. The Prophet ﷺ then ruled, "The child belongs to the marriage bed," and cut off attachment through fornication with his words, "and for the fornicator, the stone." "Al-aahir" means the fornicator.His statement, "and for the fornicator, the stone," carries two meanings. The first is that the married fornicator is to be stoned. The second is disappointment, meaning he has no share in the child.His statement, "He saw a resemblance to Utba and said, 'He is yours, Abd,'" indicates that resemblance is not relied upon in attaching lineage when something stronger than it exists, namely his statement, "The child belongs to the marriage bed," for this is a general principle. As for one who has no marriage bed or spouse, there is disagreement among the scholars about this. Some did not hold that the child of fornication is attached to its father, such as Shafii, Malik, Abu Thawr, and others. In their view, intercourse through fornication has no legal effect at all. Indeed, they permitted the fornicator to marry the mother of the woman he fornicated with, as well as her daughter. Shafii went further and said it is permissible to marry the daughter born from his own seed through fornication. Abu Hanifa and others held that intercourse through fornication carries the same ruling as intercourse through marriage regarding the prohibition of in-law relationships, and Ahmad held this view as well.Umar bin Khattab used to attach the children of pre-Islamic times to their fathers, and it may be that it was for this reason that Muawiya
attached Ziyad to his father Abu Sufyan bin Harb, based on his claim that Ziyad was his son. The correct view on this matter is what the people of Kufa held, and there is a detailed discussion of it set out by the jurists.