وَٱتَّبَعُواْ مَا تَتۡلُواْ ٱلشَّيَٰطِينُ عَلَىٰ مُلۡكِ سُلَيۡمَٰنَۖ وَمَا كَفَرَ سُلَيۡمَٰنُ وَلَٰكِنَّ ٱلشَّيَٰطِينَ كَفَرُواْ يُعَلِّمُونَ ٱلنَّاسَ ٱلسِّحۡرَ وَمَآ أُنزِلَ عَلَى ٱلۡمَلَكَيۡنِ بِبَابِلَ هَٰرُوتَ وَمَٰرُوتَۚ وَمَا يُعَلِّمَانِ مِنۡ أَحَدٍ حَتَّىٰ يَقُولَآ إِنَّمَا نَحۡنُ فِتۡنَةٞ فَلَا تَكۡفُرۡۖ فَيَتَعَلَّمُونَ مِنۡهُمَا مَا يُفَرِّقُونَ بِهِۦ بَيۡنَ ٱلۡمَرۡءِ وَزَوۡجِهِۦۚ وَمَا هُم بِضَآرِّينَ بِهِۦ مِنۡ أَحَدٍ إِلَّا بِإِذۡنِ ٱللَّهِۚ وَيَتَعَلَّمُونَ مَا يَضُرُّهُمۡ وَلَا يَنفَعُهُمۡۚ وَلَقَدۡ عَلِمُواْ لَمَنِ ٱشۡتَرَىٰهُ مَا لَهُۥ فِي ٱلۡأٓخِرَةِ مِنۡ خَلَٰقٖۚ وَلَبِئۡسَ مَا شَرَوۡاْ بِهِۦٓ أَنفُسَهُمۡۚ لَوۡ كَانُواْ يَعۡلَمُونَ ١٠٢
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!
وَتَّبَعُو مَا تَتْلُ شَّیَاتِينُ عَلَا مُلْکِ سُلَیْمَانَ وَمَا کَفَرَ سُلَیْمَانُ وَلَاکِنَّ شَّیَاتِينَ کَفَرُو یُعَلِّمُونَ نَّاسَ سِّهْرَ وَمَا اُنْزِلَ عَلَ لْمَلَکَیْنِ بِبَابِلَ هَارُوتَ وَمَارُوتَ وَمَا یُعَلِّمَانِ مِنْ اَهَدِنْ هَتَّا یَقُولَا اِنَّمَا نَهْنُ فِتْنَتُنْ فَلَا تَکْفُرْ فَیَتَعَلَّمُونَ مِنْهُمَا مَا یُفَرِّقُونَ بِهِي بَیْنَ لْمَرْءِ وَزَوْجِهِي وَمَا هُمْ بِدَارِّينَ بِهِي مِنْ اَهَدِنْ اِلَّا بِءِزْنِ لَّاهِ وَیَتَعَلَّمُونَ مَا یَدُرُّهُمْ وَلَا یَنْفَعُهُمْ وَلَقَدْ عَلِمُو لَمَنِ شْتَرَاهُ مَا لَهُو فِ لْءَاخِرَتِ مِنْ خَلَاقِنْ وَلَبِئْسَ مَا شَرَوْ بِهِي اَنْفُسَهُمْ لَوْ کَانُو یَعْلَمُونْ
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.