Abu Hurairah and Zayd bin Khalid reported,

A bedouin came to the Messenger of Allah ﷺ and said, "Messenger of Allah, 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 Messenger of Allah ﷺ said, "Speak."He said, "My son was a hired worker employed by this man, and he committed adultery with his wife. I was told that my son must be stoned, so I paid a ransom of one hundred sheep and a slave girl on his behalf. Then I asked the people of knowledge, and they informed me that my son is to receive one hundred lashes and be banished for a year, while this man's wife is the one to be stoned."The Messenger of Allah ﷺ said, "By the One in whose hand is my soul, I will judge between you according to the Book of Allah. The slave girl and the sheep are to be returned to you. Your son shall receive one hundred lashes and be banished for a year. Anees, go tomorrow to this man's wife, and if she confesses, stone her."He went to her the next day, and she confessed, so the Messenger of Allah ﷺ ordered that she be stoned, and she was stoned.

Bukhari 2724-2725

Sahih

حدثنا قتيبة بن سعيد حدثنا ليث عن ابن شهاب عن عبيد الله بن عبد الله بن عتبة بن مسعود

عن أبي هريرة وزيد بن خالد الجهني رضي الله عنهما أنهما قالا

إن رجلا من الأعراب أتى رسول الله ﷺ فقال يا رسول الله أنشدك الله إلا قضيت لي بكتاب الله فقال الخصم الآخر وهو أفقه منه نعم فاقض بيننا بكتاب الله وأذن لي فقال رسول الله ﷺ قل قال إن ابني كان عسيفا على هذا فزنى بامرأته وإني أخبرت أن على ابني الرجم فافتديت منه بمائة شاة ووليدة فسألت أهل العلم فأخبروني أنما على ابني جلد مائة وتغريب عام وأن على امرأة هذا الرجم فقال رسول الله ﷺ والذي نفسي بيده لأقضين بينكما بكتاب الله الوليدة والغنم رد وعلى ابنك جلد مائة وتغريب عام اغد يا أنيس إلى امرأة هذا فإن اعترفت فارجمها قال فغدا عليها فاعترفت فأمر بها رسول الله ﷺ فرجمت

البخاري 2724-2725صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Conditions
Chapter
Conditions that are not permissible in legal punishments
Numbering
Darussalam 2724-2725
Bukhari2724 2724-2725