Ibn ‘Abbās (may Allah be pleased with him) reported that Hilāl ibn Umayyah went to the Prophet (may Allah's peace and blessings be upon him) and accused his wife of committing illegal sexual intercourse with Sharīk ibn Sahmā'. The Messenger of Allah (may Allah's peace and blessings be upon him) said: "Either you provide proof, or you will receive the legal punishment on your back." Hilāl said: "O Messenger of Allah, if one of us saw a man on top of his wife, should he go and look for witnesses?" The Prophet (may Allah's peace and blessings be upon him) kept saying: "Either you provide proof, or you will receive the legal punishment on your back." Hilāl then said: "By the One Who sent you with the Truth, I am truthful, and Allah will reveal to you what will save my back from the legal punishment." Then (the following) was revealed: {And for those who accuse their wives...} [Sūrat An-Nūr: 24:6] He kept reciting until he reached: {...if he was of the truthful.} [ Sūrat An-Nūr: 24:9]. Then the Prophet (may Allah's peace and blessings be upon him) left and had her summoned. So Hilāl came and took an oath. So the Prophet (may Allah's peace and blessings be upon him) was saying: "Allah knows that one of you is a liar, so, will either of you repent?" Then the woman got up and took the oaths, and when she was about to take the fifth one, the people stopped her and said to her: "It will definitely bring about Allah's curse upon you (if you are guilty)." So she hesitated and recoiled so much that we thought that she would withdraw her denial. But she said: "I will not dishonor my family for the rest of their days." The Prophet (may Allah's peace and blessings be upon him) then said: "Watch her, if she delivers a child with eyes that appear to have kohl on them, big bottoms, and fat shins, then it is Sharīk ibn Sahmā's child." (Later) she gave birth to a child fitting that description. So the Prophet (may Allah's peace and blessings be upon him) said: "If it had not been settled in the Book of Allah, there would have been a matter between me and her."
Authentic hadith -
Al-Bukhari and Muslim. This is the wording of Al-Bukhari