Sahih Bukhari Volume 9, Book 89, Hadith Number 280.

Narrated By Abu Huraira : A man came to Allah’s Apostle while he was in the mosque, and called him, saying, “O Allah’s Apostle! I have committed illegal sexual intercourse.” The Prophet turned his face to the other side, but when the man gave four witnesses against himself, the Prophet said to him, “Are you mad?” The man said, “No.” So the Prophet said (to his companions), “Take him away and stone him to death.”