Narrated Ibn `Umar:
A man accused his wife of illegal sexual intercourse and denied his paternity to her (conceived) child during the lifetime of Allah's Messenger (ﷺ). Allah's Messenger (ﷺ) ordered them both to do Mula'ana as Allah decreed and then gave his decision that the child would be for the mother, and a divorce decree was issued for the couple involved in a case of Mula'ana.
USC-MSA web (English) reference: Vol. 6, Book 60, Hadith 272
Arabic reference: Book 65, Hadith 4748