Sunan Abi Dawud, Book 39, Hadith 49 (Abu Dawud 4341)

Narrated Jabir ibn Abdullah:

The Prophet (ﷺ) said: If any man is among a people in whose midst he does acts of disobedience, and, though they are able to make him change (his acts), they do not change, Allah will smite them with punishment before they die.