They both 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 knowledgeable of the two, said, "Yes, Messenger of Allah, 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 for this man, and he committed adultery with the man's wife. I was told that my son was liable to 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 was only liable to receive a hundred lashes and one year of exile, while stoning was the penalty upon the man's wife."The Messenger of Allah ﷺ said, "By the One in whose hand my soul is, I shall judge between you by the Book of Allah. As for your sheep and your slave girl, they are to be returned to you." He then had the man's son flogged a hundred lashes and exiled him for a year, and he ordered Unays Aslami to go to the other man's wife, and if she confessed, to stone her. She confessed, and he stoned her.
حدثنا عبد الله بن مسلمة القعنبي عن مالك عن ابن شهاب عن عبيد الله بن عبد الله بن عتبة بن مسعود
أنهما أخبراه أن رجلين اختصما إلى رسول الله ﷺ فقال أحدهما يا رسول الله اقض بيننا بكتاب الله وقال الآخر وكان أفقههما أجل يا رسول الله فاقض بيننا بكتاب الله وأذن لي أن أتكلم قال تكلم قال إن ابني كان عسيفا على هذا والعسيف الأجير فزنى بامرأته فأخبروني أن على ابني الرجم فافتديت منه بمائة شاة وبجارية لي ثم إني سألت أهل العلم فأخبروني أن على ابني جلد مائة وتغريب عام وإنما الرجم على امرأته فقال رسول الله ﷺ أما والذي نفسي بيده لأقضين بينكما بكتاب الله أما غنمك وجاريتك فرد إليك وجلد ابنه مائة وغربه عاما وأمر أنيسا الأسلمي أن يأتي امرأة الآخر فإن اعترفت رجمها فاعترفت فرجمها
Bukhari narrated it in the Book of Oaths and Vows, the chapter on how the Prophet's oath used to be, hadith no. 6633, 6634, from the hadith of Malik through this same chain, and it is found in Muwatta (Yahya): 2/822. Muslim also narrated it, hadith no. 1698, from the hadith of Ibn Shihab Zuhri through this same chain.