"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.'"
أَتَى النَّبِيَّ ﷺ رَجُلٌ فَقَالَ يَا رَسُولَ اللَّهِ أَرَأَيْتَ رَجُلاً لَقِيَ امْرَأَةً وَلَيْسَ بَيْنَهُمَا مَعْرِفَةٌ فَلَيْسَ يَأْتِي الرَّجُلُ شَيْئًا إِلَى امْرَأَتِهِ إِلاَّ قَدْ أَتَى هُوَ إِلَيْهَا إِلاَّ أَنَّهُ لَمْ يُجَامِعْهَا قَالَ فَأَنْزَلَ اللَّهُ ( أَقِمِ الصَّلاَةَ طَرَفَىِ النَّهَارِ وَزُلَفًا مِنَ اللَّيْلِ إِنَّ الْحَسَنَاتِ يُذْهِبْنَ السَّيِّئَاتِ ذَلِكَ ذِكْرَى لِلذَّاكِرِينَ ) فَأَمَرَهُ أَنْ يَتَوَضَّأَ وَيُصَلِّيَ قَالَ مُعَاذٌ فَقُلْتُ يَا رَسُولَ اللَّهِ أَهِيَ لَهُ خَاصَّةً أَمْ لِلْمُؤْمِنِينَ عَامَّةً قَالَ بَلْ لِلْمُؤْمِنِينَ عَامَّةً