كَذَّبَ الَّذينَ مِن قَبلِهِم فَأَتاهُمُ العَذابُ مِن حَيثُ لا يَشعُرونَ
Those who were before them impugned [divine guidance], whereat the punishment overtook them whence they were not aware.
EXEGESIS
The verse does not specify what the previous nations impugned. However, since the verses before and after are about the Holy Quran and God’s revelation, this verse also describes those who rejected God’s revelation, guidance, and apostles.
The letter fāʾ (translated as whereat) indicates that their impugning (denial) was the cause of the sudden punishment that overtook them. This direct consequence of their deeds was explicated in the last verse: Taste what you used to earn.
[1] Razi, 26/449.