Surah Az-Zumar, Ayah 49 (39:49)
فَإِذَا مَسَّ ٱلۡإِنسَٰنَ ضُرّٞ دَعَانَا ثُمَّ إِذَا خَوَّلۡنَٰهُ نِعۡمَةٗ مِّنَّا قَالَ إِنَّمَآ أُوتِيتُهُۥ عَلَىٰ عِلۡمِۭۚ بَلۡ هِيَ فِتۡنَةٞ وَلَٰكِنَّ أَكۡثَرَهُمۡ لَا يَعۡلَمُونَ ٤٩
Arabic: King Fahd Complex Hafs text.
English translation
49. When harm touches man, he calls to Us (for help); then when We have (rescued him from that harm and) changed it into a favour from Us, he says: "Only because of knowledge (that I possess) I obtained it." Nay, it is only a trial, but most of them know not!
Hilali and Khan (QuranEnc.com)