On the authority of Abu Umâmah
Al-Bâhiliyy – may Allâh be pleased with him – who said that the
Messenger of Allâh – Sallallâhu alayhi wa sallam – was in the mosque
while we were sitting with him when a man came and said, 'O Messenger of Allâh, I am guilty of a prescribed punishment; implement it on me.' The Messenger of Allâh – Sallallâhu alayhi wa sallam – remained silent. The man said again, 'O Messenger of Allâh, I am guilty of a prescribed punishment, implement it on me.'
Still the Messenger of Allâh – Sallallâhu alayhi wa sallam – remained
silent. The Prayer was thereafter established when the Prophet of Allâh
– Sallallâhu alayhi wa sallam – finished its observance, Abu Umâmah –
may Allâh be pleased with him – said, the man went after the Messenger
of Allâh – Sallallâhu alayhi wa sallam – after he had finished and I
too followed the Messenger of Allâh – Sallallâhu alayhi wa sallam –
looking at what the man wanted to do. When the man got to where the
Messenger of Allâh – Sallallâhu alayhi wa sallam – was, he said, 'O Messenger of Allâh, I am guilty of a prescribed punishment, implement it on me.' Abu Umâmah – may Allâh be pleased with him – said, 'The Messenger of Allâh – Sallallâhu alayhi wa sallam – then said, 'Didn't you, when you left your house, perform the ablution perfectly?' The man replied that he did. The Messenger of Allâh – Sallallâhu alayhi wa sallam – said, 'Didn't you observe the Prayer with us?' The man said he did. Then the Messenger of Allâh – Sallallâhu alayhi wa sallam – said to him, 'Indeed Allâh has forgiven you of the prescribed punishment' or that he – Sallallâhu alayhi wa sallam – said, 'Your sin.'
Muslim recorded it in his Sahîh,
Book of Repentance, Chapter of Allâh's Words: 'Verily, the good deeds
remove the evil deeds.' (number: 5091).