It is narrated from Sayyiduna Abu Hurayrah and Sayyiduna Zayd bin Khalid al-Juhani (may Allah be pleased with them both) that a man from among the Bedouins came to the Messenger of Allah (peace and blessings be upon him) and said: O Messenger of Allah! I adjure you by Allah to judge for me only according to the Book of Allah. The other party, who had more understanding than him, said: Yes, judge between us according to the Book of Allah, and permit me to speak. The Messenger of Allah (peace and blessings be upon him) said: "Speak." He said: My son was a hired worker for this man, and he committed adultery with his wife. I was told that stoning was due upon my son, so I ransomed him from it with a hundred sheep and a slave girl. Then I asked the people of knowledge, and they told me that upon my son is only a hundred lashes and exile for a year, while stoning is due upon his wife. The Messenger of Allah (peace and blessings be upon him) said: "By the One in whose hand is my soul! I shall judge between you two only according to the Book of Allah: the sheep and the slave girl are to be returned, and upon your son are a hundred lashes and exile for one year. And O Unays," addressing a man from the tribe of Aslam, "go to this man's wife; if she confesses, stone her." So he went to her in the morning, and she confessed, and by the order of the Messenger of Allah (peace and blessings be upon him) she was stoned.
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 5169