Mishkat al-Masabih 575
عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ قَالَ: جَاءَ رَجُلٌ إِلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ يَا رَسُولَ اللَّهِ إِنِّي عَالَجْتُ امْرَأَةً فِي أَقْصَى الْمَدِينَةِ وَإِنِّي أَصَبْتُ مِنْهَا مَا دُونَ أَنْ أَمَسَّهَا فَأَنَا هَذَا فَاقْضِ فِيَّ مَا شِئْتَ. فَقَالَ عُمَرَ لَقَدْ سَتَرَكَ اللَّهُ لَو سترت نَفْسِكَ. قَالَ وَلَمْ يَرُدَّ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَلَيْهِ شَيْئًا فَقَامَ الرَّجُلُ فَانْطَلَقَ فَأَتْبَعَهُ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ رَجُلًا فَدَعَاهُ وتلا عَلَيْهِ هَذِه الْآيَة (أقِم الصَّلَاةَ طَرَفَيِ النَّهَارِ وَزُلَفًا مِنَ اللَّيْلِ إِنَّ الْحَسَنَات يذْهبن السَّيِّئَات ذَلِك ذكرى لِلذَّاكِرِينَ) فَقَالَ رَجُلٌ مِنَ الْقَوْمِ يَا نَبِيَّ اللَّهِ هَذَا لَهُ خَاصَّة قَالَ: «بل للنَّاس كَافَّة» . رَوَاهُ مُسلم
From ʿAbdullah ibn Masʿud, who said: A man came to the Prophet ﷺ and said: "O Messenger of Allah, I dallied with a woman in the far part of Madinah, and I did with her what was short of intercourse. Here I am, so judge me as you wish." ʿUmar said: "Allah had concealed you; if only you had concealed yourself." He said: And the Prophet ﷺ did not reply to him at all. The man stood up and left, and the Prophet ﷺ sent a man after him, who called him, and he recited to him this verse: 'Establish the prayer at the two ends of the day and in some hours of the night. Indeed, good deeds remove evil deeds. That is a reminder for those who remember.' A man among the people said: "O Prophet of Allah, is this for him specifically?" He said: "Rather, for all the people." Reported by Muslim.