We were with the Messenger of Allah ﷺ when a man came to him and said, "I implore you by Allah to judge between us according to the Book of Allah."His opponent, who was more knowledgeable than him, said, "Yes, judge between us by the Book of Allah, and grant me permission to speak."The Prophet ﷺ said, "Speak."The man said, "My son was a hired worker for this man, and he committed adultery with his wife. I paid a ransom of one hundred sheep and a servant on his behalf. Then I asked Some men of knowledge, and I was informed that my son must receive one hundred lashes and be exiled for a year, while this man's wife must be stoned."The Messenger of Allah ﷺ said, "By the One in whose hand is my soul, I will surely judge between you by the Book of Allah. The hundred sheep and the servant are returned to you, and your son shall receive one hundred lashes and be exiled for a year. Unays, go in the morning to this man's wife, and if she confesses, stone her."Hisham said, So Unays went to her in the morning, she confessed, and he stoned her.
حدثنا أبو بكر بن أبي شيبة وهشام بن عمار ومحمد بن الصباح قالوا حدثنا سفيان بن عيينة عن الزهري عن عبيد الله بن عبد الله
كنا عند رسول الله ﷺ فأتاه رجل فقال أنشدك الله لما قضيت بيننا بكتاب الله فقال خصمه وكان أفقه منه اقض بيننا بكتاب الله وأذن لي حتى أقول قال قل قال إن ابني كان عسيفا على هذا وإنه زنى بامرأته فافتديت منه بمائة شاة وخادم فسألت رجالا من أهل العلم فأخبرت أن على ابني جلد مائة وتغريب عام وأن على امرأة هذا الرجم فقال رسول الله ﷺ والذي نفسي بيده لأقضين بينكما بكتاب الله المائة الشاة والخادم رد عليك وعلى ابنك جلد مائة وتغريب عام واغد يا أنيس على امرأة هذا فإن اعترفت فارجمها قال هشام فغدا عليها فاعترفت فرجمها
Bukhari narrated it in the Book of Hudud, chapter "Confessing to Zina," Hadith 6828 and 6860, from the hadith of Ibn Uyayna. Muslim narrated it in the Book of Hudud, chapter "One Who Confesses to Zina Against Himself," Hadith 1698, from the hadith of Zuhri, with the same wording.