ثُمَّ بَدَّلْنَا مَكَانَ ٱلسَّيِّئَةِ ٱلْحَسَنَةَ حَتَّىٰ عَفَوا۟ وَّقَالُوا۟ قَدْ مَسَّ ءَابَآءَنَا ٱلضَّرَّآءُ وَٱلسَّرَّآءُ فَأَخَذْنَٰهُم بَغْتَةًۭ وَهُمْ لَا يَشْعُرُونَ٩٥
Then We changed their adversity into prosperity until they flourished and said, “Our forefathers were also afflicted with hardship and ease.” Then We seized them by surprise while they were unaware.
[ ↗ Study from physical print edition ]Then We exchanged in place of the bad [condition], good, until they increased [and prospered] and said, "Our fathers [also] were touched with hardship and ease." So We seized them suddenly while they did not perceive.
[ ↗ Study from physical print edition ]95. After trying them with suffering and illness Allah improved their situation and turned their suffering into well-being and safety, until they became many and their wealth increased, and they said that the bad and good that they had experienced was a normal part of life and that the same thing had happened to their ancestors before them. They did not recognise that there was a lesson to be learned in the difficulties that occurred to them and that there was a test for them in the good that they were given. Then Allah overtook them suddenly with the punishment, while they were unaware of it and did not expect it.
Then We gave them in place of evil the chastisement good wealth and health until they multiplied and said out of ingratitude towards this grace ‘Hardship and happiness befell our fathers before’ just as it has befallen us and this is nothing but the habit of time and not the consequence of God so remain firm in what you follow. God exalted be He says So We seized them with the chastisement suddenly while they perceived not beforehand the time of its coming.
The Arabic word: سَّيِّئَةِ 'sayyiah' in this verse refers to distress, while the word: حَسَنَةَ 'hasanah' signifies prosperity, and the word عَفَو ` Afw': signifies increase or growth. The verse implies firstly that, they were made to undergo a test of hardship and suffering in order that they may repent and turn to Allah. When they did not take lesson from this warning and were a failure in this test, they were put to another test of a different kind. Their adversity was replaced with prosperity and their distress with ease and comfort until they increased in number and strength. This prosperity, after a long period of adversity, should have made them grateful to their Lord and they should have repented to Allah, but being completely lost in material pursuits and perverted by their mundane desires, they did nothing but to say, 'The suffering and prosperity came to our fathers (too).' that is, their suffering and prosperity had nothing to do with their deeds, it was just a natural course of changing phenomena. It was after their obstinate persistence in their evil and ignorance that they were seized by the punishment of Allah. The verse said, 'Then We seized them suddenly while they were unaware.'
Tafsir al-Qurtubi [The Compendium of Legal Rulings]
تفسير القرطبي (الجامع لأحكام القرآن)قَوْلُهُ تَعَالَى: ﴿وَما أَرْسَلْنا فِي قَرْيَةٍ مِنْ نَبِيٍّ﴾ فِيهِ إِضْمَارٌ، وَهُوَ فَكَذَّبَ أَهْلُهَا. إِلَّا أَخَذْنَاهُمْ. (بِالْبَأْساءِ وَالضَّرَّاءِ لَعَلَّهُمْ يَضَّرَّعُونَ) تَقَدَّمَ الْقَوْلُ فِيهِ [[راجع ج ٢ ص ٢٤٣.]]. (ثُمَّ بَدَّلْنا مَكانَ السَّيِّئَةِ الْحَسَنَةَ) أَيْ أَبْدَلْنَاهُمْ بِالْجَدْبِ خِصْبًا. حَتَّى عَفَوْا أَيْ كَثُرُوا، عَنِ ابْنِ عَبَّاسٍ. وَقَالَ ابْنُ زَيْدٍ: كَثُرَتْ أَمْوَالُهُمْ وَأَوْلَادُهُمْ. وَعَفَا: مِنَ الْأَضْدَادِ: عَفَا: كَثُرَ. وَعَفَا: دَرَسَ. أَعْلَمَ اللَّهُ تَعَالَى أَنَّهُ أَخَذَهُمْ بِالشِّدَّةِ وَالرَّخَاءِ فَلَمْ يَزْدَجِرُوا وَلَمْ يَشْكُرُوا. وَقَالُوا قَدْ مَسَّ آبَاءَنَا الضَّرَّاءُ وَالسَّرَّاءُ فَنَحْنُ مِثْلُهُمْ. فَأَخَذْنَاهُمْ بَغْتَةً أَيْ فَجْأَةً ليكون أكثر حسرة.