فَلَمَّا نَسُوْا مَا ذُكِّرُوْا بِهٖٓ اَنْجَيْنَا الَّذِيْنَ يَنْهَوْنَ عَنِ السُّوْۤءِ وَاَخَذْنَا الَّذِيْنَ ظَلَمُوْا بِعَذَابٍۢ بَـِٔيْسٍۢ بِمَا كَانُوْا يَفْسُقُوْنَ ( الأعراف: ١٦٥ )
Falammaa nasoo maa zukkiroo bihee anjainal lazeena yanhawna 'anis sooo'i wa akhaznal lazeena zalamoo bi'azaabim ba'eeim bimaa kaanooyafsuqoon (al-ʾAʿrāf 7:165)
Sahih International:
And when they [i.e., those advised] forgot that by which they had been reminded, We saved those who had forbidden evil and seized those who wronged, with a wretched punishment, because they were defiantly disobeying. (Al-A'raf [7] : 165)
1 Mufti Taqi Usmani
So, when they forgot the advice they were given, We saved those who used to forbid evil and seized those who transgressed with a bitter punishment, because they had been disobeying.