It is narrated from Sayyiduna Abu Hurayrah and Sayyiduna Zayd bin Khalid al-Juhani (may Allah be pleased with them both) that a man came to the Prophet (peace and blessings be upon him) and said: O Messenger of Allah! My son was a hired worker for this man, and he committed adultery with his wife. The people told us that stoning was due upon my son, so I ransomed him from it with a slave girl and a hundred sheep. Then the people of knowledge told me that upon my son are a hundred lashes and exile for a year, and that stoning is due upon this man's wife. (The narrator said:) I think he said: So judge between us according to the Book of Allah. The Prophet (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 returned to you, and upon your son are a hundred lashes and exile for a year." And he said to a man from the tribe of Aslam called Unays: "O Unays! Get up and ask this man's wife; if she confesses, stone her."
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 5170