Narrated 'Abdullah:
A man came to the Prophet (ﷺ) and said: 'I fondled a woman who lives on the edge of Al-Madinah, and I did with her what is less than intercourse, and here I am, so judge in my case as you will.' So 'Umar said to him: 'Allah covered you, so you should have covered yourself.' The Messenger of Allah (ﷺ) did not give him any reply. The man left but the Messenger of Allah (ﷺ) sent a man after him to call him. He recited to him: 'And perform Salat, at the two ends of the day and in some hours of the night. Verily, the good deeds remove the evil deeds. That is a reminder for the mindful (11:114) until the end of the Ayah. A man among the people said: 'Is this specific for him?' He (ﷺ) said: 'No. Rather for all of the people.'