Sahih Muslim | Book 37 | Hadith Number 6661

Narrated by Abu Umama
Abu Umama reported: We were sitting in the mosque in the company of Allah's Messenger (may peace be upon him). A person came there and said: Allah's Messenger, I have committed an offence which deserves the imposition of hadd upon me, so impose it upon me. Allah's Messenger (may peace be upon him) kept silent. He repeated it and said:

Allah's Messenger, I have committed an offence which deserves the imposition of hadd upon me, so impose it upon me. He (the Holy Prophet) kept silent, and it was at this time that Iqama was pronounced for prayer (and the prayer was observed). And when Allah's Apostle (may peace be upon him) had concluded the payer that person followed Allah's Messenger (may peace be upon him). Abu Umama said: I too followed Allah's Messenger (may peace be upon him) after he had concluded the prayer, so that I should know what answer he would give to that person. That person remained attached to Allah's Messenger (may peace be upon him) and said: Allah's Messenger, I have committed an offence which deserves imposition of hadd upon me, so impose it upon me. Abu Umama reported that Allah's Messenger (may peace be upon him) said to him: Didn't you see that as you got out of the house, you performed ablution perfectly well. He said: Allah's Messenger, of course. I did it. He again said to him: Then you observed prayer along with us. He said: Allah's Messenger, yes, it is so. Thereupon Allah's Messenger (may peace be upon him) said to him: Verily, Allah has exempted you from the imposition of hadd, or he said. From your sin.