Surah Al-A'raf, ayah 168

7:168

وَقَطَّعۡنَٰهُمۡ فِي ٱلۡأَرۡضِ أُمَمٗاۖ مِّنۡهُمُ ٱلصَّٰلِحُونَ وَمِنۡهُمۡ دُونَ ذَٰلِكَۖ وَبَلَوۡنَٰهُم بِٱلۡحَسَنَٰتِ وَٱلسَّيِّـَٔاتِ لَعَلَّهُمۡ يَرۡجِعُونَ ١٦٨

Waqatta'nāhum fil-ardi umamam minhumus-sālihūna waminhum dūna dhālika wabalawnāhum bil-hasanāti was-sayyi'āti la'allahum yarji'ūn

And We divided them throughout the earth into nations. Of them some were righteous, and of them some were otherwise. And We tested them with good [times] and bad that perhaps they would return [to obedience].