Uwaymir came to Asim bin Adi, who was the chief of Banu Ajlan, and said, "What do you say about a man who finds another man with his wife? Should he kill him, in which case you would execute him in retaliation, or what should he do? Ask the Messenger of Allah ﷺ about this for me."So Asim went to the Prophet ﷺ and said, "Messenger of Allah!" But the Messenger of Allah ﷺ disliked such questions and disapproved of them.Uwaymir said, "By Allah, I will not stop until I ask the Messenger of Allah ﷺ about it myself."Uwaymir came and said, "Messenger of Allah, what about a man who finds another man with his wife? Should he kill him, in which case you would execute him in retaliation, or what should he do?"The Messenger of Allah ﷺ replied, "Allah has revealed Quran concerning you and your wife."So the Messenger of Allah ﷺ commanded the two of them to perform the mutual cursing as Allah named in His Book, and he carried out the lian against her.Then Uwaymir said, "Messenger of Allah, if I keep her, I will have wronged her." So he divorced her.This became the practice for those who came after them in cases of mutual cursing.Then the Messenger of Allah ﷺ said, "Watch closely. If she gives birth to a dark child with deep black eyes, large buttocks, and full legs, then I can only think that Uwaymir told the truth about her. But if she gives birth to a reddish child resembling a wahrah lizard, then I can only think that Uwaymir lied about her."She gave birth to a child matching the description by which the Messenger of Allah ﷺ indicated that Uwaymir had told the truth, and afterward the child was attributed only to his mother.
أن عويمرا أتى عاصم بن عدي، وكان سيد بني عجلان، فقال: كيف تقولون في رجل وجد مع امرأته رجلا، أيقتله فتقتلونه، أم كيف يصنع؟ سل لي رسول الله ﷺ عن ذلك، فأتى عاصم النبي ﷺ، فقال: يا رسول الله! فكره رسول الله ﷺ المسائل، وعابها، قال عويمر: والله لا أنتهي حتى أسأل رسول الله ﷺ عن ذلك، فجاء عويمر، فقال: يا رسول الله! رجل وجد مع امرأته رجلا، أيقتله، فتقتلونه أم كيف يصنع؟ فقال رسول الله ﷺ: قد أنزل الله القرآن فيك وفي صاحبتك. فأمرهما رسول الله ﷺ بالملاعنة بما سمى الله في كتابه، فلاعنها، ثم قال: يا رسول الله! إن حبستها فقد ظلمتها، فطلقها. فكانت سنة لمن كان بعدهما في المتلاعنين، ثم قال رسول الله ﷺ: انظروا، فإن جاءت به أسحم، أدعج العينين، عظيم الأليتين، خدلج الساقين، فلا أحسب عويمرا إلا قد صدق عليها، وإن جاءت به أحيمر، كأنه وحرة، فلا أحسب عويمرا إلا قد كذب عليها. فجاءت به على النعت الذي نعت به رسول الله ﷺ من تصديق عويمر، فكان بعد ينسب إلى أمه.
Bukhari narrated it in tafsir (4745), and Muslim in lian (1492), both through Zuhri, from Sahl bin Saad, and he related it. The wording given is that of Bukhari, and Muslim's wording is similar, except that he did not mention his saying ﷺ, "Watch, for if she gives birth to a dark-skinned child..." to the end. Bukhari added in another version (4746), "She was pregnant, and he denied the pregnancy, and her son used to be attributed to her. Then it became established practice regarding inheritance that he inherits from her, and she inherits from him what Allah has decreed for her."