7:165
فَلَمَّا نَسُوا۟ مَا ذُكِّرُوا۟ بِهِۦٓ أَنجَيْنَا ٱلَّذِينَ يَنْهَوْنَ عَنِ ٱلسُّوٓءِ وَأَخَذْنَا ٱلَّذِينَ ظَلَمُوا۟ بِعَذَابٍۭ بَـِٔيسٍۭ بِمَا كَانُوا۟ يَفْسُقُونَ
falammā nasū mā dhukkirū bihi anjaynā alladhīna yanhawna ʿani l-sūi wa-akhadhnā alladhīna ẓalamū biʿadhābin baīsin bimā kānū yafsuqūna
When they ignored [the warning] they were given, We saved those who forbade evil, and punished the wrongdoers severely because of their disobedience.
So when they forgot the remindings that had been given to them, We rescued those who forbade evil, but We seized those who did wrong with a severe torment because they used to rebel against Allâh’s Command (disobey Allâh).