حَدَّثَنَا أَحْمَدُ بْنُ مُحَمَّدِ بْنِ ثَابِتٍ الْمَرْوَزِيُّ، حَدَّثَنِي عَلِيُّ بْنُ الْحُسَيْنِ، عَنْ أَبِيهِ، عَنْ يَزِيدَ النَّحْوِيِّ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ، قَالَ ‏{‏ وَاللاَّتِي يَأْتِينَ الْفَاحِشَةَ مِنْ نِسَائِكُمْ فَاسْتَشْهِدُوا عَلَيْهِنَّ أَرْبَعَةً مِنْكُمْ فَإِنْ شَهِدُوا فَأَمْسِكُوهُنَّ فِي الْبُيُوتِ حَتَّى يَتَوَفَّاهُنَّ الْمَوْتُ أَوْ يَجْعَلَ اللَّهُ لَهُنَّ سَبِيلاً ‏}‏ وَذَكَرَ الرَّجُلَ بَعْدَ الْمَرْأَةِ ثُمَّ جَمَعَهُمَا فَقَالَ ‏{‏ وَاللَّذَانِ يَأْتِيَانِهَا مِنْكُمْ فَآذُوهُمَا فَإِنْ تَابَا وَأَصْلَحَا فَأَعْرِضُوا عَنْهُمَا ‏}‏ فَنَسَخَ ذَلِكَ بِآيَةِ الْجَلْدِ فَقَالَ ‏{‏ الزَّانِيَةُ وَالزَّانِي فَاجْلِدُوا كُلَّ وَاحِدٍ مِنْهُمَا مِائَةَ جَلْدَةٍ ‏}‏ ‏.‏

Ibn ‘Abbas said: The Qur’anic verse goes: “If any of your woman are guilty of lewdness, take the evidence of four (reliable) witnesses from amongst you against them, and if they testify, Confine them to houses until death do chain them or Allah ordains for them some (other) way. Allah then mentioned man after woman and combined them in another verse : “If two men among you are guilty of lewdness, punish them both. If they repent and amend, leave them alone. This command was abrogated by the verse relating to flogging : “The woman and the man guilty of adultery or fornication – flog each of them with one hundred stripes. Translation Not Available

Book Ref: Sunan Abi Dawud Book 40 Hadith 4413
Web Ref:  Sunan Abi Dawud Book 39 Hadith 4399