وَٱتَّبَعُواْ مَا تَتۡلُواْ ٱلشَّيَٰطِينُ عَلَىٰ مُلۡكِ سُلَيۡمَٰنَۖ وَمَا كَفَرَ سُلَيۡمَٰنُ وَلَٰكِنَّ ٱلشَّيَٰطِينَ كَفَرُواْ يُعَلِّمُونَ ٱلنَّاسَ ٱلسِّحۡرَ وَمَآ أُنزِلَ عَلَى ٱلۡمَلَكَيۡنِ بِبَابِلَ هَٰرُوتَ وَمَٰرُوتَۚ وَمَا يُعَلِّمَانِ مِنۡ أَحَدٍ حَتَّىٰ يَقُولَآ إِنَّمَا نَحۡنُ فِتۡنَةٞ فَلَا تَكۡفُرۡۖ فَيَتَعَلَّمُونَ مِنۡهُمَا مَا يُفَرِّقُونَ بِهِۦ بَيۡنَ ٱلۡمَرۡءِ وَزَوۡجِهِۦۚ وَمَا هُم بِضَآرِّينَ بِهِۦ مِنۡ أَحَدٍ إِلَّا بِإِذۡنِ ٱللَّهِۚ وَيَتَعَلَّمُونَ مَا يَضُرُّهُمۡ وَلَا يَنفَعُهُمۡۚ وَلَقَدۡ عَلِمُواْ لَمَنِ ٱشۡتَرَىٰهُ مَا لَهُۥ فِي ٱلۡأٓخِرَةِ مِنۡ خَلَٰقٖۚ وَلَبِئۡسَ مَا شَرَوۡاْ بِهِۦٓ أَنفُسَهُمۡۚ لَوۡ كَانُواْ يَعۡلَمُونَ ١٠٢
They followed what the evil ones gave out (falsely) against the power of Solomon: the blasphemers Were, not Solomon, but the evil ones, teaching men Magic, and such things as came down at babylon to the angels Harut and Marut. But neither of these taught anyone (Such things) without saying: "We are only for trial; so do not blaspheme." They learned from them the means to sow discord between man and wife. But they could not thus harm anyone except by Allah's permission. And they learned what harmed them, not what profited them. And they knew that the buyers of (magic) would have no share in the happiness of the Hereafter. And vile was the price for which they did sell their souls, if they but knew!
wattaba’û maa tatlû aşşayaatînu ’alaa mulki sulaymaana wamaa kafara sulaymaanu walaakinna aşşayaatîna kafarû yu’allimûna annaasa assihra wamaa 'unzila ’alaa almalakayni bibaabila haarûta wamaarûta wamaa yu’allimaani min 'ahadin hattaa yaqûlaa 'innamaa nahnu fitnatun falaa takfur fayata’allamûna minhumaa maa yufarriqûna bihi bayna almar'i wazawcihi wamaa hum bidaarrîna bihi min 'ahadin 'illaa bi'izni allaahi wayata’allamûna maa yadurruhum walaa yanfa’uhum walaqad ’alimû lamani iştaraahu maa lahu fî al'aaxirati min xalaaqin walabi'sa maa şaraw bihi 'anfusahum law kaanû ya’lamûna
But God's kindness luṬf with all is abundant. And when God most high said “And they learned what hurt them and did not profit them” people of discernment know that knowledge of things can be undesirable even though [knowledge itself] is a praiseworthy attribute. The Prophet ﷺ said “I seek refuge in You from knowledge that has no benefit.” evil then would have been that they sold themselves for if they had but known. If the one who has been deceived knew what endures mādhā abqā and what brings trial mādhā ablā he would be torn apart by sorrows. But on the day when secrets are tested [86:9] he will know the precious gifts that have passed him by.