40:83
فَلَمَّا جَآءَتْهُمْ رُسُلُهُم بِٱلْبَيِّنَـٰتِ فَرِحُوا۟ بِمَا عِندَهُم مِّنَ ٱلْعِلْمِ وَحَاقَ بِهِم مَّا كَانُوا۟ بِهِۦ يَسْتَهْزِءُونَ
falammā jāathum rusuluhum bil-bayināti fariḥū bimā ʿindahum mina l-ʿil'mi waḥāqa bihim mā kānū bihi yastahziūna
When messengers came to them with clear signs, they revelled in the knowledge they had, and so they were engulfed by the very punishment they mocked:
Then when their Messengers came to them with clear proofs, they were glad (and proud) with that which they had of the knowledge (of worldly things). And that at which they used to mock, surrounded them (i.e. the punishment).