A man came to Allah's Messenger (ﷺ) and said, "O Allah's Messenger (ﷺ)! Suppose a man saw another man with
his wife, should he kill him whereupon you might kill him (i.e. the killer) (in Qisas) or what should he
do?" So Allah revealed concerning their case what is mentioned of the order of Mula'ana. Allah's
Apostle said to the man, "The matter between you and your wife has been decided." So they did
Mula'ana in the presence of Allah's Messenger (ﷺ) and I was present there, and then the man divorced his
wife. So it became a tradition to dissolve the marriage of those spouses who were involved in a case of
Mula'ana. The woman was pregnant and the husband denied that he was the cause of her pregnancy,
so the son was (later) ascribed to her. Then it became a tradition that such a son would be the heir of
his mother, and she would inherit of him what Allah prescribed for her.
Sahih al-Bukhari Book 65, Hadith 268