Allaah (The Most High) said:
وَلَقَدۡ أَرۡسَلۡنَآ إِلَىٰٓ أُمَمٍ۬ مِّن قَبۡلِكَ فَأَخَذۡنَـٰهُم بِٱلۡبَأۡسَآءِ وَٱلضَّرَّآءِ لَعَلَّهُمۡ يَتَضَرَّعُونَ
فَلَوۡلَآ إِذۡ جَآءَهُم بَأۡسُنَا تَضَرَّعُواْ وَلَـٰكِن قَسَتۡ قُلُوبُہُمۡ وَزَيَّنَ لَهُمُ ٱلشَّيۡطَـٰنُ مَا ڪَانُواْ يَعۡمَلُونَ
فَلَمَّا نَسُواْ مَا ذُڪِّرُواْ بِهِۦ فَتَحۡنَا عَلَيۡهِمۡ أَبۡوَٲبَ ڪُلِّ شَىۡءٍ حَتَّىٰٓ إِذَا فَرِحُواْ بِمَآ أُوتُوٓاْ أَخَذۡنَـٰهُم بَغۡتَةً۬ فَإِذَا هُم مُّبۡلِسُونَ
فَقُطِعَ دَابِرُ ٱلۡقَوۡمِ ٱلَّذِينَ ظَلَمُواْۚ وَٱلۡحَمۡدُ لِلَّهِ رَبِّ ٱلۡعَـٰلَمِينَ
Verily, We sent (Messengers) to many nations before you (O Muhammad). And We seized them with extreme poverty (or loss in wealth) and loss in health with calamities so that they might believe with humility.
When Our Torment reached them, why then did they not believe with humility? But their hearts became hardened, and Shaitan (Satan) made fair-seeming to them that which they used to do.
So, when they forgot (the warning) with which they had been reminded, We opened to them the gates of every (pleasant) thing, until in the midst of their enjoyment in that which they were given, all of a sudden, We took them to punishment, and lo! They were plunged into destruction with deep regrets and sorrows.
So the roots of the people who did wrong were cut off. And all the praises and thanks be to Allah, the Lord of the ‘Alamin (mankind, jinns, and all that exists). [6: 42-45]