Sahih Bukhari Volume 008, Book 078, Hadith Number 629.

Narated By Abu Huraira and Zaid bin Khalid : Two men had a dispute in the presence of Allah's Apostle. One of them said, "O Allah's Apostle! Judge between us according to Allah's Laws." The other who was wiser, said, "Yes, O Allah's Apostle! Judge between us according to Allah's Laws and allow me to speak. The Prophet said, "Speak." He said, "My son was a laborer serving this (person) and he committed illegal sexual intercourse with his wife, The people said that my son is to be stoned to death, but I ransomed him with one-hundred sheep and a slave girl. Then I asked the learned people, who informed me that my son should receive one hundred lashes and will be exiled for one year, and stoning will be the lot for the man's wife." Allah's Apostle said, "Indeed, by Him in Whose Hand my soul is, I will judge between you according to Allah's Laws: As for your sheep and slave girl, they are to be returned to you." Then he scourged his son one hundred lashes and exiled him for one year. Then Unais Al-Aslami was ordered to go to the wife of the second man, and if she confessed (the crime), then stone her to death. She did confess, so he stoned her to death.