(19) باب إِذَا أَنْزَلَ اللَّهُ بِقَوْمٍ عَذَابًا
Narrated Ibn `Umar:
Allah's Messenger (ﷺ) said, "If Allah sends punishment upon a nation then it befalls upon the whole population indiscriminately and then they will be resurrected (and judged) according to their deeds. "
Reference: Sahih al-Bukhari 7108
In-book reference: Book 92, Hadith 55
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 9, Book 88, Hadith 224