An-Nu'man bin Bashir narrated that the Messenger of Allah (SAW) said: "The parable of the one who upholds Allah's laws and the one who breaches them, is that of a people who drew lots on a ship at sea. Some of them got the upper part, and some of them the lower part.
Those on the lower part ascended to get water, spilling it upon those upper part. So those in the upper part say: 'We will not leave you to come up here and bother us.'
Then those on the lower part say: 'We should make a hole in the lower part so we can get water.' If they take them by the hand and stop them, then they will save all of them, and if they leave them, they will all drown." (Tirmidhi)
Tafseer from Tirmidhi:
'The Hadith is explicit on the point that if sinfulness and evil deeds become
rampant in a society, and the virtuous people in it fail in their duty to stop it,
though they had the power to do it, all the people shall suffer punishment from Allah.'