Narrated Abu Hurairah and Zaid bin Khalid Al-Juhani: A Bedouin came to Allah’s Messenger, peace be upon him, and said, “O Allah’s Messenger! I ask you by Allah to judge my case according to Allah’s Laws.” His opponent, who was more, learned than he, said, “Yes, judge between us according to Allah’s Laws and allow me to speak.” Allah’s Messenger, peace be upon him, said, “Speak.” He said, “My son was working as a laborer for this man and he committed illegal sexual intercourse with his wife. The people told me that it was obligatory that my son should be stoned to death, so in lieu of that I ransomed my son by paying one hundred sheep and a slave-girl. Then I asked the religious scholars about it and they informed me that my son must be lashed one hundred lashes, and be exiled for one year. The wife of this (man) must be stoned to death.”

Allah’s Messenger, peace be upon him, said “By Him in Whose Hands my soul is, I will judge between you according to Allah’s Law. The slave-girl and the sheep are to be returned to you. Your son is to receive one hundred lashes and be exiled for one year. O Unais, go to the wife of this (man) and if she confesses her guilt, stone her to death.” Unais went to that woman next morning and she confessed. Allah’s Messenger, peace be upon him, ordered that she be stoned to death.
(3: 885- O.B. Sahih Al-Bukhari)