Abu Hurairah and Zayd bin Khalid reported,

Both of them reported that two men brought a dispute before the Messenger of Allah ﷺ.One of them said, "Messenger of Allah, judge between us by the Book of Allah."The other, who was the more learned of the two, said, "Yes, Messenger of Allah, 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 was told that my son must be stoned, so I ransomed him with a hundred sheep and a slave-girl of mine. Then I asked the people of knowledge, and they informed me that my son is to receive a hundred lashes and exile for a year, while stoning is the penalty upon this man's wife."The Messenger of Allah ﷺ said, "By the One in whose hand is my soul, I shall judge between you by the Book of Allah. As for your sheep and your slave-girl, they are returned to you. And your son shall receive a hundred lashes and be exiled for a year."Then he ordered Unays Aslami to go to the other man's wife. If she confessed, he was to stone her. She confessed, and he stoned her.

Azami 6731

Sahih

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

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

الأعظمي 6731صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Judgeship
Chapter
Conduct of the judge
Section
Referring judgment to the Quran and Sunnah together
Numbering
Jami al-Kamil 6731 (2nd edition)
Azami 6731