An-Nisaa • EN-TAFSIR-IBN-ABBAS
﴿ وَٱلَّٰتِى يَأْتِينَ ٱلْفَٰحِشَةَ مِن نِّسَآئِكُمْ فَٱسْتَشْهِدُوا۟ عَلَيْهِنَّ أَرْبَعَةًۭ مِّنكُمْ ۖ فَإِن شَهِدُوا۟ فَأَمْسِكُوهُنَّ فِى ٱلْبُيُوتِ حَتَّىٰ يَتَوَفَّىٰهُنَّ ٱلْمَوْتُ أَوْ يَجْعَلَ ٱللَّهُ لَهُنَّ سَبِيلًۭا ﴾
“AND AS FOR those of your women who become guilty of immoral conduct, call upon four from among you who have witnessed their guilt; and if these bear witness thereto, confine the guilty women to their houses until death takes them away or God opens for them a way [through repentance].”
(As for those of your women) your free, married women (who are guilty of lewdness) i.e. of fornication, (call to witness) that they were caught red-handed in the act (four of you against them) four of your free men. (And if they testify) to the Truth of the allegation (then confine them to the houses) keep them in prison (until death take them) until they die in prison (or (until) Allah appoint for them a way) out by means of stoning. Imprisoning a free, married woman who commits fornication until she dies in prison was later abrogated by stoning.