Sayyiduna Sahl bin Sa'd al-Sa'idi (may Allah be pleased with him) said that a man came to the Prophet (peace and blessings be upon him) and said: "O Messenger of Allah! What do you think: if a man sees another man with his wife, should he kill him, and then you would kill him (in retaliation), or what should he do?" Allah Almighty revealed in the Noble Qur'an (the verses) about li'an (mutual imprecation). The Messenger of Allah (peace and blessings be upon him) said to him: "A ruling has come concerning you and your wife." The narrator said: The two of them performed li'an while I was present with the Messenger of Allah (peace and blessings be upon him). He said: "O Messenger of Allah (peace and blessings be upon him)! If I keep her, it will be as though I lied against her," and he separated from her. After that, it became the established Sunnah that the two who perform li'an are to be separated. The woman was pregnant, but he denied the pregnancy, so her son came to be called after his mother. Then it became the established Sunnah that the son inherits from his mother and she inherits from him the share that Allah has prescribed for her.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12489