Al-Zuhri narrates from Sayyiduna Sahl bin Sa'd (may Allah be pleased with him) that a man came to the Prophet (peace and blessings be upon him) and said: "O Messenger of Allah (peace and blessings be upon him)! What is your view about a man who sees another man with his wife: should he kill him? Would you then kill him? Or what should he do?" Thereupon Allah, the Lord of Might, mentioned li'an in the Qur'an. The Messenger of Allah (peace and blessings be upon him) said: "Judgment has been made concerning you and your wife." The narrator says: The two of them performed li'an, and I was with him (peace and blessings be upon him). The man said: "O Messenger of Allah (peace and blessings be upon him)! If I keep her as my wife, then I have lied against her," and he separated from her. After that, this became the practice: the two who perform li'an are to be separated. The woman was pregnant, and the husband had denied her pregnancy, and the son was attributed to his mother. Then, in inheritance, the mother inherits from the son and the son from the mother, according to the shares Allah Almighty has fixed for them.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللعان / 15344