Hadith on Evil: Punishment of Allah sent upon righteous, wicked alike

Umm Salamah reported: The Messenger of Allah, peace and blessings be upon him, said, “When evil appears on the earth, Allah sends down his punishment upon its inhabitants.” I said, “O Messenger of Allah, even if the righteous are among them?” The Prophet said, “Yes. If there are righteous among them, they are afflicted as the people are afflicted. Then, they will return to the mercy of Allah.”

Source: al-Mu’jam al-Awsaṭ 2110

Grade: Sahih (authentic) according to Al-Albani

عَنْ أُمِّ سَلَمَةَ زَوْجِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قالت قال رَسُول اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا ظَهَرَ السُّوءُ فِي الْأَرْضِ أَنْزَلَ اللَّهُ بَأْسَهُ بِأَهْلِ الْأَرْضِ قُلْتُ يَا رَسُولَ اللَّهِ وَإِنْ كَانَ فِيهِمْ صَالِحُونَ قَالَ نَعَمْ وَإِنْ كَانَ فِيهِم صَالِحُونَ يُصِيبُهُمْ مَا أَصَابَ النَّاسُ ثُمَّ يَرْجِعُونَ لِرَحَمَةِ اللَّهِ

2110 المعجم الأوسط للطبراني

680 المحدث الألباني خلاصة حكم المحدث صحيح في صحيح الجامع