The Hadeeth of the Prophet - صلّى الله عليه وسلّم;
"The child goes to [the owner of] the bed and the adulterer gets nothing but the stone."
Is this general, whether the owner of the bed claims the child or doesn’t claim him?
Or is it specific to the case when the alleged father (fornicator) claims the child to be his? Meaning if the fornicatress has no bed (i.e. no owner of the bed to claim the child) and the fornicator claims the child to be his own. Is the child to be attributed to him [in this case] or not?
The majority of the scholars are of the opinion that it is general, and the fornicator has no right over the child that was conceived with his water [i.e. sperm out of wedlock].
Some scholars held the opinion that this is specific to the situation where there is dispute; meaning if the fornicator and the owner of the bed dispute who the child belongs to, we rule in favor of the owner of the bed.
However if no one contends the fornicator in his claim that the child is his, then he has that right [to claim him/her] and the child is to be attributed to him. This is the more correct opinion that is in agreement with intellect, and likewise with the Legislation upon contemplation.
Rulings Related to Marrying the Fornicatress