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

It was narrated that Abu Hurairah said:

"The Messenger of Allah 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.'"