[Those before them had already plotted, but Allah came at their building from the foundations], meaning: those whom He destroyed with the earthquake from among the bygone nations; the earth shook beneath them, [so the roof fell upon them from above them], meaning: the roofs of their dwellings collapsed upon them.
﴿قَدْ مَكَرَ الَّذِينَ مِنْ قَبْلِهِمْ فَأَتَى اللَّهُ بُنْيَانَهُمْ مِنَ الْقَوَاعِدِ﴾ يَعْنِي: الَّذِينَ أَهْلَكَ بِالرَّجْفَةِ مِنَ الأُمَمِ السَّالِفَةِ رَجَفَتْ بِهِمُ الأَرْضُ ﴿فَخَرَّ عَلَيْهِمُ السَّقْفُ مِنْ فَوْقِهِمْ﴾ سَقَطت سقوف مَنَازِلهمْ عَلَيْهِم.