Those who commit immorality [i.e., unlawful sexual intercourse] of your women - bring against them four [witnesses] from among you. And if they testify,1 confine them [i.e., the guilty women] to houses until death takes them or Allāh ordains for them [another] way.2
Translation: Saheeh International (English)
1 The witnesses must swear to actually having seen the act taking place.
2 The "other way" (i.e., penalty) was later revealed in 24:2, canceling the ruling in this verse.
فَٱسۡتَشۡهِدُواْthen call to witnessfa-is'tashhidū
عَلَيۡهِنَّagainst themʿalayhinna
أَرۡبَعَةٗfourarbaʿatan
مِّنكُمۡۖamong youminkum
فَإِنAnd iffa-in
شَهِدُواْthey testifyshahidū
فَأَمۡسِكُوهُنَّthen confine themfa-amsikūhunna
فِيinfī
ٱلۡبُيُوتِtheir housesl-buyūti
حَتَّىٰuntilḥattā
يَتَوَفَّىٰهُنَّcomes to themyatawaffāhunna
ٱلۡمَوۡتُ[the] deathl-mawtu
أَوۡoraw
يَجۡعَلَmakesyajʿala
ٱللَّهُAllahl-lahu
لَهُنَّfor themlahunna
سَبِيلٗاa waysabīlan
Tafsir
For those of your women who commit sexual offences – whether they are married or unmarried – call four trustworthy Muslim men witnesses. If they bear witness against them, then confine them to their homes as a punishment, until the end of their lives, or until Allah makes a way for them other than being confined. The ruling of this verse was replaced with the ruling that unmarried women who have illicit sexual relations should be whipped a hundred times and banished for a year, and married women who have illicit sexual relations should be stoned.