Ghafir - 40:83

فَلَمَّا جَاءتْهُمْ رُسُلُهُم بِالْبَيِّنَاتِ فَرِحُوا بِمَا عِندَهُم مِّنَ الْعِلْمِ وَحَاقَ بِهِم مَّا كَانُوا بِهِ يَسْتَهْزِئُون
[40:83]
Then when their messengers came to them with clear arguments, they exulted in what they had with them of knowledge, and there beset them that which they used to mock.
For when their messengers came to them with Clear Signs, they exulted in such knowledge (and skill) as they had; but that very (Wrath) at which they were wont to scoff hemmed them in.
And when their messengers brought them clear proofs (of Allah's Sovereignty) they exulted in the knowledge they (themselves) possessed. And that which they were wont to mock befell them.