وَٱلَّذَانِ يَأۡتِيَٰنِهَا مِنكُمۡ فَـَٔاذُوهُمَاۖ فَإِن تَابَا وَأَصۡلَحَا فَأَعۡرِضُواْ عَنۡهُمَآۗ إِنَّ ٱللَّهَ كَانَ تَوَّابٗا رَّحِيمًا ١٦
Walladhāni ya'tiyānihā minkum fa'ādhūhumā fa in tābā wa aslahā fa a'ridū 'anhumā innallāha kāna tawwābar rahīmā
And the two171 who commit it [i.e., unlawful sexual intercourse] among you - punish [i.e., dishonor] them both. But if they repent and correct themselves, leave them alone. Indeed, Allāh is ever Accepting of Repentance and Merciful.
Footnotes
171 Scholars differ over whether "the two" refers to two of the same sex (i.e., homosexuals) or those of opposite sexes. In either case, later rulings outlined in the sunnah have replaced this one.