A bedouin came to Messenger of Allah ﷺ and said, "O Allah's apostle! I ask you by Allah to judge My case according to Allah's Laws." His opponent, who was more learned than he, said, "Yes, judge between us according to Allah's Laws, and allow me to speak." Messenger of Allah ﷺ said, "Speak." He (i .e. the bedouin or the other man) said, "My son was working as a laborer for this (man) and he committed illegal sexual intercourse with his wife. The people told me that it was obligatory that my son should be stoned to death, so in lieu of that I ransomed my son by paying one hundred sheep and a slave girl. Then I asked the religious scholars about it, and they informed me that my son must be lashed one hundred lashes, and be exiled for one year, and the wife of this (man) must be stoned to death." Messenger of Allah ﷺ said, "By Him in Whose Hands my soul is, I will judge between you according to Allah's Laws. The slave-girl and the sheep are to be returned to you, your son is to receive a hundred lashes and be exiled for one year. You, Unais, go to the wife of this (man) and if she confesses her guilt, stone her to death." Unais went to that woman next morning and she confessed. Messenger of Allah ﷺ ordered that she be stoned to death. (Using translation from Bukhārī 2724)
بَيْنَا نَحْنُ عِنْدَ رَسُولِ اللهِ ﷺ قَامَ إِلَيْهِ رَجُلٌ مِنَ الْأَعْرَابِ فَقَالَ يَا رَسُولَ اللهِ اقْضِ لِي بِكِتَابِ اللهِ فَقَامَ خَصْمُهُ فَقَالَ صَدَقَ يَا رَسُولَ اللهِ اقْضِ لَهُ بِكِتَابِ اللهِ وَأْذَنْ لِي فَقَالَ لَهُ رَسُولُ اللهِ ﷺ قُلْ فَقَالَ إن ابْنِي كَانَ عَسِيفًا عَلَى هَذَا وَالْعَسِيفُ الْأَجِيرُ فَزَنَى بِامْرَأَتِهِ فَأَخْبَرَونِي أَنَّ عَلَى ابْنِي الرَّجْمَ فَافْتَدَيْتُ مِنْهُ بِمِائَةٍ مِنَ الْغَنَمِ وَوَلِيدَةٍ ثُمَّ سَأَلْتُ أَهْلَ الْعِلْمِ فَأَخْبَرُونِي أَنَّ عَلَى امْرَأَتِهِ الرَّجْمَ وَإِنَّمَا عَلَى ابْنِي جَلْدُ مِائَةٍ وَتَغْرِيبُ عَامٍ فَقَالَ رَسُولُ اللهِ ﷺ وَالَّذِي نَفْسِي بِيَدِهِ لَأَقْضِيَنَّ بَيْنَكُمَا بِكِتَابِ اللهِ أَمَّا الْوَلِيدَةُ وَالْغَنَمُ فَرُدُّوهَا وَأَمَّا ابْنُكَ فَعَلَيْهِ جَلْدُ مِائَةٍ وَتَغْرِيبُ عَامٍ وَأَمَّا أَنْتَ يَا أُنَيْسُ لِرَجُلٍ مِنْ أَسْلَمَ فَاغْدُ عَلَى امْرَأَةِ هَذَا فَإِنِ اعْتَرَفَتْ فَارْجُمْهَا فَغَدَا عَلَيْهَا أُنَيْسٌ فَاعْتَرَفَتْ فَرَجَمَهَا