The Prophet ﷺ said, "When an adulterer commits illegal sexual intercourse, then he is not a believer at the time, he is doing it, and when a drinker of an alcoholic liquor drinks it, then he is not a believer at the time of drinking it, and when a thief steals, then he is not a believer at the time of stealing, and when a robber robs, and the people look at him, then he is not a believer at the time of doing robbery. (Using translation from Bukhārī 2475)
قَالَ رَسُولُ اللهِ ﷺ «لَا يَزْنِي الزَّانِي حِينَ يَزْنِي وَهُوَ مُؤْمِنٌ وَلَا يَسْرِقُ السَّارِقُ حِينَ يَسْرِقُ وَهُوَ مُؤْمِنٌ وَلَا يَشْرَبُ الْخَمْرَ حِينَ يَشْرَبُهَا وَهُوَ مُؤْمِنٌ وَلَا يَنْتَهِبُ نُهْبَةً ذَاتَ شَرَفٍ يَرْفَعُ الْمُؤْمِنُونَ إِلَيْهِ فِيهَا أَبْصَارَهُمْ وَهُوَ حِينَ يَنْتَهِبُهَا مُؤْمِنٌ»