"A man came to the Prophet ﷺ and said: 'O Messenger of Allah! What do you say about a man who meets a woman and there is no acquaintance between them. So there is nothing that a man who would do with his wife but he does it with her, except that he does not have intercourse with her?'" He said: "So Allah revealed: And perform the 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). So he ordered him to perform Wudu and Salat." Then Mu'adh said: "I said: 'O Messenger of Allah! Is that specifically for him, or for the believers in general?' He said: 'Rather it is for the believers in general.'" (Using translation from Tirmidhī 3113)
أَتَى رَسُولَ اللهِ ﷺ رَجُلٌ فَقَالَ يَا رَسُولَ اللهِ مَا تَقُولُ فِي رَجُلٍ لَقِيَ امْرَأَةً لَا يَعْرِفُهَا فَلَيْسَ يَأْتِي الرَّجُلُ مِنَ امْرَأَتِهِ شَيْئًا إِلَّا قَدْ أَتَاهُ مِنْهَا غَيْرَ أَنَّهُ لَمْ يُجَامِعْهَا؟ قَالَ فَأَنْزَلَ اللهُ ﷻ هَذِهِ الْآيَةَ {أَقِمِ الصَّلَاةَ طَرَفَيِ النَّهَارِ وَزُلَفًا مِنَ اللَّيْلِ إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّيِّئَاتِ} [هود 114] الْآيَةَ قَالَ فَقَالَ لَهُ النَّبِيُّ ﷺ تَوَضَّأْ ثُمَّ صَلِّ قَالَ مُعَاذٌ فَقُلْتُ يَا رَسُولَ اللهِ أَلَهُ خَاصَّةً أَمْ لِلْمُؤْمِنِينَ عَامَّةً؟ قَالَ بَلْ لِلْمُؤْمِنِينَ عَامَّةً