It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "When Allah Almighty intends to send punishment upon a people, then the punishment descends upon all the inhabitants there; then they will be resurrected according to their deeds (in the punishment, all—righteous and wicked—will be included, but reward and punishment will be according to deeds)."