the decree that all the towns were to be destroyed or afflicted with severe punishment was already written in the book before the day of judgment.
وإن من قرية إلا نحن مهلكوها قبل يوم القيامة أو معذبوها عذابا شديدا كان ذلك في الكتاب مسطورا