Abdullah bin Masud reported,

A man came to the Prophet ﷺ and said, "I was intimate with a woman on the outskirts of Madinah. I took from her everything short of intercourse. Here I am, so judge me as you see fit."Umar said to him, "Allah had concealed your sin. You should have concealed it yourself."The Messenger of Allah ﷺ gave him no reply, so the man departed. Then the Messenger of Allah ﷺ sent a man after him to call him back, and he recited to him, "And establish prayer at the two ends of the day and during parts of the night. Indeed, good deeds wipe away bad deeds. That is a reminder for those who remember" [Hud 11:114], reciting to the end of the verse.One of the people present asked, "Is this just for him?"He replied, "No, rather it is for all people."

Tirmidhi 3112

Sahih

حدثنا قتيبة حدثنا أبو الأحوص عن سماك بن حرب عن إبراهيم عن علقمة والأسود

عن عبد الله قال

جاء رجل إلى النبي ﷺ فقال إني عالجت امرأة في أقصى المدينة وإني أصبت منها ما دون أن أمسها وأنا هذا فاقض في ما شئت فقال له عمر لقد سترك الله لو سترت على نفسك فلم يرد عليه رسول الله ﷺ شيئا فانطلق الرجل فأتبعه رسول الله ﷺ رجلا فدعاه فتلا عليه {وأقم الصلاة طرفي النهار وزلفا من الليل إن الحسنات يذهبن السيئات ذلك ذكرى للذاكرين} إلى آخر الآية فقال رجل من القوم هذا له خاصة قال لا بل للناس كافة

الترمذي 3112صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Tafsir of the Quran
Chapter
From Surah Hud
Numbering
Darussalam 3112
Tirmidhi 3112