Sayyiduna Abu Hurayrah and Sayyiduna Zayd bin Khalid al-Juhani (may Allah be pleased with them both) said: Two men came to the Prophet (peace and blessings be upon him) with a dispute, and (one of them) said: Judge between us by the Book of Allah. The other said the same, and he was the more understanding of the two. He said: Permit me to speak. He (peace and blessings be upon him) said: "Speak." He said: My son was working for this man, and he committed adultery with his wife. I was told that my son must be stoned, so I gave a hundred goats and one of my slave-girls as ransom for him. Then I asked the people of knowledge, and they said that my son must receive a hundred lashes and exile for one year, and that his wife must be stoned. The Prophet (peace and blessings be upon him) said: "By the One in whose hand is my soul, I will judge between you according to the Book of Allah: your son must receive a hundred lashes and exile for one year; the goats and the slave-girl will be returned to you; and his wife is to be stoned." And he sent Sayyiduna Unays (may Allah be pleased with him), saying: "Go and ask this woman; if she confesses, stone her." She confessed, and she was stoned.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 16917