Dalil

Quran Al-An'am 6:131

ذَٰلِكَ أَن لَّمۡ يَكُن رَّبُّكَ مُهۡلِكَ ٱلۡقُرَىٰ بِظُلۡمٖ وَأَهۡلُهَا غَٰفِلُونَ

Translation

That is because your Lord would not destroy the cities for wrongdoing while their people were unaware.