Abu Hurairah reported,

A man from Banu Fazarah came to the Prophet ﷺ and said, "My wife has given birth to a black boy," wishing to disown him.The Prophet ﷺ asked, "Do you have any camels?"He replied, "Yes."He asked, "What are their colors?"He said, "Red."He asked, "Is there any dusky one among them?"He said, "There are some dusky ones among them."He asked, "How do you suppose that came about?"He said, "Perhaps it was a strain that drew it back."The Prophet ﷺ said, "Then perhaps this child too has been drawn back by some strain."And he did not permit him to disown the child.

Nasai 3509

Sahih

أخبرنا محمد بن عبد الله بن بزيع قال حدثنا يزيد بن زريع قال حدثنا معمر عن الزهري عن سعيد بن المسيب

عن أبي هريرة قال

جاء رجل من بني فزارة إلى النبي ﷺ فقال إن امرأتي ولدت غلاما أسود وهو يريد الانتفاء منه فقال هل لك من إبل قال نعم قال ما ألوانها قال حمر قال هل فيها من أورق قال فيها ذود ورق قال فما ذاك ترى قال لعله أن يكون نزعها عرق قال فلعل هذا أن يكون نزعه عرق قال فلم يرخص له في الانتفاء منه

النسائي 3509صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Divorce
Chapter
If he alludes to his wife and doubts his child and wants to disavow him
Numbering
Darussalam 3509
Nasai 3509