Abu Huraira and Zaid b Khalid al-Juhani reported that one of the desert tribes came to Allah's Messenger (ﷺ) and said
Messenger of Allah , I beg of you in the name of Allah that you pronounce judgment about me according to the Book of Allah. The second claimant who was wiser than him said : Well , decide amongst us according to the Book of Allah , but permit me (to say something). Thereupon Allah's Messenger (may peace be upon ham) said : Say. He said : My son was a servant in the house of this person and he committed adultery with his wife. I was informed that my son deserved stoning to death (as punishment for this offence). I gave one hundred goats and a slave girl as ransom for this. I asked the scholars (if this could serve as an expiation for this offence). They informed me that my son deserved one hundred lathes and exile for one year. and this woman deserved stoning (as she was married). Thereupon Allah's Messenger (may peace he upon him) said : By Him in Whose Hand is my life. I will decide between you according to the Book of Allah. The slave-girl and the goats should be given back , and your son is to be punished with one hundred lashes and exile for one year. And , O Unais (b. Zuhaq al-Aslami) , go to this woman in the morning , and if she makes a confession , then stone her. He (the narrator) said : He went to her in the morning and she made a confession. And Allah's Messenger (ﷺ) made pronouncement about her and she was stoned to death.