Alqamah (may Allah have mercy on him) narrates from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him): We were in the mosque on the night of Friday when a man of the Ansar came and said: "If a man finds another man with his wife: if he speaks, you will flog him; if he kills, you will kill him; and if he stays silent, he will be keeping silent over something that enrages him. By Allah! I will certainly ask the Messenger of Allah (peace and blessings be upon him)." The next morning he came to the Messenger of Allah (peace and blessings be upon him) and asked him: If a man finds another man with his wife: if he speaks out, you will flog him; if he kills, you will kill him; and if he stays silent, he will be keeping silent over something that enrages him. He (peace and blessings be upon him) said: "Allahumma iftah (O Allah, resolve this matter)," and he (peace and blessings be upon him) was supplicating when the verses of li'an were revealed: "And those who accuse their wives and have no witnesses except themselves" [Surah al-Nur: 6]. This very man was afflicted with it, and the husband and wife came and performed li'an in the presence of the Messenger of Allah (peace and blessings be upon him). The man bore witness four times that he was truthful, and in the fifth oath he said: "The curse of Allah be upon him if he is a liar." The woman came forward for the li'an, and the Messenger of Allah (peace and blessings be upon him) said: "Stop." She performed the li'an, and when she was leaving, he (peace and blessings be upon him) said: "Perhaps she will give birth to a black child with curly hair." And she gave birth to a black child with curly hair.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللعان / 15345