And ask thou them concerning the town that was close on the sea, when they transgressed in the matter of the sabt, when their fish came unto them openly on their sabt day, while they came not on the day whereon they kept not the sabt. Thus they were wont to transgress. 163 And when a community among them said: Why preach ye to a folk whom Allah is about to destroy or punish with an awful doom, they said: In order to be free from guilt before your Lord, and that haply they may ward off (evil). 164 When they (the unjust people) forgot what was preached to them, We saved the preachers from evil and afflicted the unjust for their evil deeds, with a dreadful torment. 165 So when they took pride in that which they had been forbidden, We said unto them: Be ye apes despised and loathed! 166 And remember when your Lord announced the command that till the Day of Resurrection I will certainly send such oppressors against them, who will inflict them with a dreadful punishment; indeed your Lord is swift in meting out punishment; and indeed He is Oft Forgiving, Most Merciful. 167 And We dispersed them through the earth in communities - some were righteous, others were not -and We tested them with prosperity and adversity that they may turn back (to righteousness). 168 They were succeeded by generations who inherited the Scripture and took to the fleeting gains of this world, saying, "We shall certainly be forgiven." If there came to them similar fleeting gains again, they would take them. Was a pledge not taken from them, written in the Scripture, that they would not say anything but the truth about God? And they have studied whatever is in it. Surely the Home of the Hereafter is better for those who fear Him. Will you not understand? 169 Those who devote themselves to the teachings of the Book and are steadfast in prayer (should know that) the reward of those who reform themselves will not be lost. 170 ۞ And when We shook the mountain above them as if it were a canopy, and they supposed it was about to fall on them: 'Take forcefully what We have given you, and remember what is in it; haply you will be godfearing.' 171