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