Al-A'raf 7:94
وَمَآ أَرْسَلْنَا فِى قَرْيَةٍ مِّن نَّبِىٍّ إِلَّآ أَخَذْنَآ أَهْلَهَا بِٱلْبَأْسَآءِ وَٱلضَّرَّآءِ لَعَلَّهُمْ يَضَّرَّعُونَ
Wama arsalna fee qaryatin minnabiyyin illa akhathna ahlaha bilba/sa-iwaddarra-i laAAallahum yaddarraAAoon
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 Allāh].
We did not send any prophet to a town, but We seized its people with hardship and suffering, so that they may turn humble.