"So We made it a deterrent," meaning: a lesson. "For what was before it," Qatada said: meaning, for what preceded it of their sins before they caught the fish. "And what was after it," meaning: what came after those sins; which was their taking of the fish.
Muhammad said: And the pronoun in 'ja'alnaha' (We made it) refers, according to this interpretation, to the act. It was also said: The meaning is that We made the town of the people of the Sabbath "a deterrent for what was before it" of the towns, "and what was after it," so that they might take heed from them. And Allah knows best. [Ayah 67-68]
﴿فجعلناها نكالا﴾ أَي: عِبْرَة ﴿لِمَا بَيْنَ يَدَيْهَا﴾ قَالَ قَتَادَة: يَعْنِي: لما سلف من ذنوبهم قبل أَن يصيدوا الْحيتَان ﴿وَمَا خلفهَا﴾ يَعْنِي: مَا بعد تِلْكَ الذُّنُوب؛ وَهُوَ أَخذهم الْحيتَان.
قَالَ مُحَمَّد: وَالْهَاء الَّتِي فِي ((جعلناها)) هِيَ على هَذَا التَّأْوِيل للفعلة. وَقيل: الْمَعْنى جعلنَا قَرْيَة أَصْحَاب السبت ﴿نَكَالا لِمَا بَيْنَ يَدَيْهَا﴾ من الْقرى ﴿وَمَا خلفهَا﴾ ليتعظوا بهم. وَالله أعلم. [آيَة ٦٧ - ٦٨]