The Messenger of Allah ﷺ carried out the lian between a man and his wife, separated them, and attached the child to the mother.
أخبرنا قتيبة قال حدثنا مالك عن نافع
لاعن رسول الله ﷺ بين رجل وامرأته وفرق بينهما وألحق الولد بالأم
Reported by Muslim in the chapter on lian, hadith no. 8/1494, from Qutayba, and by Bukhari in the chapter on divorce, section, "The child is attributed to the mother's husband," hadith no. 5315, from the hadith of Malik, with this wording. It is also found in Kubra, hadith no. 5671, and in Muwatta (Yahya), 2/567, concerning lian.