Sunan Abi Dawud, Hadith 4436

Abu Hurairah said: A man and a woman of the Jews who were married committed fornication at the time when the Messenger of Allah came to Medina. Stoning was a prescribed punishment for them in accordance with the Torah, but they abandoned it and followed tajbiyyah, meaning, the man was beaten a hundred times with a rope painted with tar and was seated on a donkey with his face towards the tail of the donkey. Their rabbis then assembled and sent some people to the Messenger of Allah. They said to them: Ask him about the prescribed punishment for fornication. The transmitter then mentioned the rest of the tradition. They version adds: They were not the followers of his religion, and he (the prophet) was to pronounce judgment between them. So he was given a choice in this verse:”If they do come to thee, either judge between them, or decline to interfere.

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

sunnah.com

also referenced under: Hadith 4451 (DarusSalam)