Sahih al-Bukhari #6810
Limits and Punishments set by Allah (Hudood) 86:40
Narrated Abu Huraira:
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."