Allah said, "As for those of your women who commit unlawful intercourse, call four witnesses from among you against them. If they testify, then confine them to their houses until death takes them, or Allah appoints some way for them" [Nisa 4:15]. He mentioned the man after the woman, then spoke of them together, saying, "And as for the two of you who commit it, punish them both. But if they repent and make amends, leave them alone" [Nisa 4:16].This was then abrogated by the verse of flogging, where He said, "The adulteress and the adulterer, flog each one of them a hundred lashes, and let no pity for them take hold of you in the religion of Allah, if you believe in Allah and the Last Day. And let a group of the believers witness their punishment" [Nur 24:2].
قال {والتي يأتين الفاحشة من نسائكم فاستشهدوا عليهن أربعة منكم فإن شهدوا فأمسكوهن في البيوت حتى يتوفاهن الموت أو يجعل الله لهن سبيلا} [النساء: ١٥] وذكر الرجل بعد المرأة، ثم جمعهما فقال: {والذان يأتينها منكم فءاذوهما فإن تاب وأصلحا فأعرضوا عنهما} [النساء: ١٦] نسخ ذلك بآية الجلد فقال: {الزانية والزاني فاجلدوا كل واحد منهما مائة جلدة ولا تأخذكم بهما رأفة في دين الله إن كنتم تؤمنون بالله واليوم الآخر وليشهد عذابهما طائفة من المؤمنين} [النور: ٢].
Abu Dawud (4413) narrated it, and Bayhaqi (8/210) narrated it from his route, from Ahmad bin Muhammad bin Thabit Marwazi, who said, my father told me, from Ali bin Husayn, from his father, from Yazid Nahwi, from Ikrima, from Ibn Abbas, and he mentioned it.Its chain is hasan because of Ali bin Husayn and his father Husayn bin Waqid Marwazi, for both of them are truthful.