فَكُلًّا اَخَذْنَا بِذَنْۢبِهٖۙ فَمِنْهُمْ مَّنْ اَرْسَلْنَا عَلَيْهِ حَاصِبًا ۚوَمِنْهُمْ مَّنْ اَخَذَتْهُ الصَّيْحَةُ ۚوَمِنْهُمْ مَّنْ خَسَفْنَا بِهِ الْاَرْضَۚ وَمِنْهُمْ مَّنْ اَغْرَقْنَاۚ وَمَا كَانَ اللّٰهُ لِيَظْلِمَهُمْ وَلٰكِنْ كَانُوْٓا اَنْفُسَهُمْ يَظْلِمُوْنَ ( العنكبوت: ٤٠ )
Fakullan akhaznaa bizam bihee faminhum man arsalnaa 'alaihi haasibaa; wa minhum man akhazat hus saihatu wa minhum man khasafnaa bihil arda wa minhum man aghraqnaa; wa maa kaanal laahu li yazlimahum wa laakin kaanoo anfusahum yazlimoon (al-ʿAnkabūt 29:40)
So each We seized for his sin; and among them were those upon whom We sent a storm of stones, and among them were those who were seized by the blast [from the sky], and among them were those whom We caused the earth to swallow, and among them were those whom We drowned. And Allah would not have wronged them, but it was they who were wronging themselves. (Al-'Ankabut  : 40)
1 Mufti Taqi Usmani
Thus We seized each one of them for his sin. So to some of them We sent a violent wind; and some of them were seized by a Cry; and some of them We made to sink in the earth; and some of them We drowned. And Allah was not to do injustice to them, but they used to do injustice to their own selves.