Sunan an-Nasa'i, Book 51, Hadith 121 (In-Book)

It was narrated that Abu Hurairah said: "The Messenger of Allah [SAW] said: 'The adulterer is not a believer at the moment when he is committing adultery, and the wine drinker is not a believer at the moment when he is drinking wine, and the thief is not a believer at the moment when he is stealing, and the robber is not a believer at the moment when he is robbing and people are looking on.'"

أَخْبَرَنَا عِيسَى بْنُ حَمَّادٍ، قَالَ أَنْبَأَنَا اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، عَنْ أَبِي بَكْرِ بْنِ عَبْدِ الرَّحْمَنِ بْنِ الْحَارِثِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ يَزْنِي الزَّانِي حِينَ يَزْنِي وَهُوَ مُؤْمِنٌ وَلاَ يَشْرَبُ الْخَمْرَ شَارِبُهَا حِينَ يَشْرَبُهَا وَهُوَ مُؤْمِنٌ وَلاَ يَسْرِقُ السَّارِقُ حِينَ يَسْرِقُ وَهُوَ مُؤْمِنٌ وَلاَ يَنْتَهِبُ نُهْبَةً يَرْفَعُ النَّاسُ إِلَيْهِ فِيهَا أَبْصَارَهُمْ حِينَ يَنْتَهِبُهَا وَهُوَ مُؤْمِنٌ ‏" ‏ ‏.‏

sunnah.com