الاعراف — Al-A'raf Ayat 94
وَمَآ اَرْسَلْنَا فِيْ قَرْيَةٍ مِّنْ نَّبِيٍّ اِلَّآ اَخَذْنَآ اَهْلَهَا بِالْبَأْسَاۤءِ وَالضَّرَّاۤءِ لَعَلَّهُمْ يَضَّرَّعُوْنَ
Wa mā arsalnā fī qaryatim min nabiyyin illā akhażnā ahlahā bil-ba'sā'i waḍ-ḍarrā'i la‘allahum yaḍḍarra‘ūn(a).
"And We sent to no city a prophet [who was denied] except that We seized its people with poverty and hardship that they might humble themselves [to Allah]."