Hadithcore
Sunan Abi Dawud, 4372
hasan· Al-Albani

Narrated Abdullah ibn Abbas:

The verse "The punishment of those who wage war against Allah and His Messenger, and strive with might and main for mischief through the land is execution, or crucifixion, or the cutting off of hands and feet from opposite side or exile from the land...most merciful" was revealed about polytheists. If any of them repents before they are arrested, it does not prevent from inflicting on him the prescribed punishment which he deserves.

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

References2 variants
In-Book Reference
Book 40, Hadith 22
English Reference
Book 39, Hadith 4359