Sahih al-Bukhari Book 86, Hadith 39
The Prophet (ﷺ) said, "The one who commits an illegal sexual intercourse is not a believer at the time of
committing illegal sexual intercourse and a thief is not a believer at the time of committing theft and a
drinker of alcoholic drink is not a believer at the time of drinking. Yet, (the gate of) repentance is open
thereafter."
Allah's Messenger (ﷺ)s said, "When a slave (of Allah) commits illegal sexual intercourse, he is not a believer at the time of committing it; and if he steals, he is not a believer at the time of stealing; and if he drinks an alcoholic drink, when he is not a believer at the time of drinking it; and he is not a believer when he commits a murder," 'Ikrima said: I asked Ibn Abbas, "How is faith taken away from him?" He said, Like this," by clasping his hands and then separating them, and added, "But if he repents, faith returns to him like this, by clasping his hands again.
I said, "O Allah's Messenger (ﷺ)! Which is the biggest sin?" He said, "To set up rivals to Allah by worshipping others though He alone has created you." I asked, "What is next?" He said, "To kill your child lest it should share your food." I asked, "What is next?" He said, "To commit illegal sexual intercourse with the wife of your neighbor."