Sahih Muslim, Book 29, Hadith 35 (Muslim 4393)

'Abdullah b. Buraida reported on the authority of his father that Ma'iz b. Malik al-Aslami came to Allah's Messenger (ﷺ) and said:

Allah's Messenger, I have wronged myself; I have committed adultery and I earnestly desire that you should purify me. He turned him away. On the following day, he (Ma'iz) again came to him and said: Allah's Messenger, I have committed adultery. Allah's Messenger (ﷺ) turned him away for the second time, and sent him to his people saying: Do you know if there is anything wrong with his mind. They denied of any such thing in him and said: We do not know him but as a wise good man among us, so far as we can judge. He (Ma'iz) came for the third time, and he (the Holy Prophet) sent him as he had done before. He asked about him and they informed him that there was nothing wrong with him or with his mind. When it was the fourth time, a ditch was dug for him and he (the Holy Prophet) pronounced judg- ment about him and he wis stoned. He (the narrator) said: There came to him (the Holy Prophet) a woman from Ghamid and said: Allah's Messenger, I have committed adultery, so purify me. He (the Holy Prophet) turned her away. On the following day she said: Allah's Messenger, Why do you turn me away? Perhaps, you turn me away as you turned away Ma'iz. By Allah, I have become pregnant. He said: Well, if you insist upon it, then go away until you give birth to (the child). When she was delivered she came with the child (wrapped) in a rag and said: Here is the child whom I have given birth to. He said: Go away and suckle him until you wean him. When she had weaned him, she came to him (the Holy Prophet) with the child who was holding a piece of bread in his hand. She said: Allah's Apostle,...