Take from me. Verily Allah has ordained a way for them (the women who commit fornication),: (When) a married man (commits adultery) with a married woman, and an unmarried male with an unmarried woman, then in case of married (persons) there is (a punishment) of one hundred lashes and then stoning (to death). And in case of unmarried persons, (the punishment) is one hundred lashes and exile for one year. (Using translation from Muslim 1690c)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ إِذَا نَزَلَ عَلَيْهِ الْوَحْيُ كُرِبَ لِذَلِكَ وَتَرَبَّدَ لَهُ وَجْهُهُ فَأَنْزَلَ اللهُ عَلَيْهِ ذَاتَ يَوْمٍ فَلَقِيَ ذَلِكَ فَلَمَّا سُرِّيَ عَنْهُ قَالَ خُذُوا عَنِّي قَدْ جَعَلَ اللهُ لَهُنَّ سَبِيلًا الثَّيِّبُ بِالثَّيِّبِ وَالْبِكْرُ بِالْبِكْرِ الثَّيِّبُ جَلْدُ مِائَةٍ ثُمَّ رَجْمٌ بِالْحِجَارَةِ وَالْبِكْرُ جَلْدُ مِائَةٍ وَنَفْيُ سَنَةٍ