"Those who commit lewdness among your women, call four witnesses against them from among yourselves. If they testify, then confine them to their houses until death takes them or Allah ordains for them another way" [Nisa 4:15].Then He mentioned the man after the woman, and then combined them both, saying, "And the two among you who commit it, punish them both. If they repent and amend, then leave them alone" [Nisa 4:16].This was then abrogated by the verse of flogging, where Allah said, "The adulteress and the adulterer, flog each one of them a hundred lashes" [Nur 24:2].
حدثنا أحمد بن محمد بن ثابت المروزي حدثني علي بن الحسين عن أبيه عن يزيد النحوي عن عكرمة
{واللاتي يأتين الفاحشة من نسائكم فاستشهدوا عليهن أربعة منكم فإن شهدوا فأمسكوهن في البيوت حتى يتوفاهن الموت أو يجعل الله لهن سبيلا} وذكر الرجل بعد المرأة ثم جمعهما فقال {واللذان يأتيانها منكم فآذوهما فإن تابا وأصلحا فأعرضوا عنهما} فنسح ذلك بآية الجلد فقال {الزانية والزاني فاجلدوا كل واحد منهما مائة جلدة}