Narrated Sahl bin Saud:
'Uwaimir came to `Asim bin `Adi who was the chief of Bani Ajlan and said, "What do you say about a man who has found another man with his wife? Should he kill him whereupon you would kill him (i.e. the husband), or what should he do? Please ask Allah's Messenger (ﷺ) about this matter on my behalf." `Asim then went to the Prophet (ﷺ) and said, "O Allah's Messenger (ﷺ)! (And asked him that question) but Allah's Messenger (ﷺ) disliked the question," When 'Uwaimir asked `Asim (about the Prophet's answer) `Asim replied that Allah's Messenger (ﷺ) disliked such questions and considered it shameful. "Uwaimir then said, "By Allah, I will not give up asking unless I ask Allah's Messenger (ﷺ) about it." Uwaimir came (to the Prophet ) and said, "O Allah's Messenger (ﷺ)! A man has found another man with his wife! Should he kill him whereupon you would kill him (the husband, in Qisas) or what should he do?" Allah's Messenger (ﷺ) said, "Allah has revealed regarding you and your wife's case in the Qur'an "So Allah's Messenger (ﷺ) ordered them to perform the measures of Mula'ana according to what Allah had mentioned in His Book. So 'Uwaimir did Mula'ana with her and said, "O Allah's Messenger (ﷺ)! If I kept her I would oppress her." So 'Uwaimir divorced her and so divorce became a tradition after them for those who happened to be involved in a case of Mula'ana. Allah's Messenger (ﷺ) then said, "Look! If she (Uwaimir's wife) delivers a black child with deep black large eyes, big hips and fat legs, then I will be of the opinion that 'Uwaimir has spoken the truth; but if she delivers a red child looking like a Wahra then we will consider that 'Uwaimir has told a lie against her." Later on she delivered a child carrying the qualities which Allah's Messenger (ﷺ) had mentioned as a proof for 'Uwaimir's claim; therefore the child was ascribed to its mother henceforth.
USC-MSA web (English) reference: Vol. 6, Book 60, Hadith 269
Arabic reference: Book 65, Hadith 4745