وَٱتَّبَعُواْ مَا تَتۡلُواْ ٱلشَّيَٰطِينُ عَلَىٰ مُلۡكِ سُلَيۡمَٰنَۖ وَمَا كَفَرَ سُلَيۡمَٰنُ وَلَٰكِنَّ ٱلشَّيَٰطِينَ كَفَرُواْ يُعَلِّمُونَ ٱلنَّاسَ ٱلسِّحۡرَ وَمَآ أُنزِلَ عَلَى ٱلۡمَلَكَيۡنِ بِبَابِلَ هَٰرُوتَ وَمَٰرُوتَۚ وَمَا يُعَلِّمَانِ مِنۡ أَحَدٍ حَتَّىٰ يَقُولَآ إِنَّمَا نَحۡنُ فِتۡنَةٞ فَلَا تَكۡفُرۡۖ فَيَتَعَلَّمُونَ مِنۡهُمَا مَا يُفَرِّقُونَ بِهِۦ بَيۡنَ ٱلۡمَرۡءِ وَزَوۡجِهِۦۚ وَمَا هُم بِضَآرِّينَ بِهِۦ مِنۡ أَحَدٍ إِلَّا بِإِذۡنِ ٱللَّهِۚ وَيَتَعَلَّمُونَ مَا يَضُرُّهُمۡ وَلَا يَنفَعُهُمۡۚ وَلَقَدۡ عَلِمُواْ لَمَنِ ٱشۡتَرَىٰهُ مَا لَهُۥ فِي ٱلۡأٓخِرَةِ مِنۡ خَلَٰقٖۚ وَلَبِئۡسَ مَا شَرَوۡاْ بِهِۦٓ أَنفُسَهُمۡۚ لَوۡ كَانُواْ يَعۡلَمُونَ ١٠٢
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’uu maa tatluu ashshayaatiinu ’alaa mulki sulaymaana wamaa kafara sulaymaanu walaakinna ashshayaatiina kafaruu yu’allimuuna annaasa assihra wamaa 'unzila ’alaa almalakayni bibaabila haaruuta wamaaruuta wamaa yu’allimaani min 'ahadin hattaa yaquulaa 'innamaa nahnu fitnatun falaa takfur fayata’allamuuna minhumaa maa yufarriquuna bihi bayna almar'i wazawjihi wamaa hum bidaarriina bihi min 'ahadin 'illaa bi'izni allaahi wayata’allamuuna maa yadurruhum walaa yanfa’uhum walaqad ’alimuu lamani ishtaraahu maa lahu fii al'aaxirati min xalaaqin walabi'sa maa sharaw bihi 'anfusahum law kaanuu ya’lamuuna
'What an evil tree you are', said Solomon. Shortly after this he died. People began to say regarding their own sick ones: 'If only we had someone like Solomon'. The devils then wrote a book and buried it under the place where Solomon used to worship. After which they said [to the people]: 'We will direct to that with which Solomon used to treat others'. They then proceeded and unearthed that book which contained magic and spells. Allah, exalted is He, therefore revealed (And follow that which the devils falsely related against the kingdom of Solomon) up to His saying (therefore disbelieve not) [2:102]”. Said al-Suddi: “People in Solomon's time wrote magic from each other and devoted themselves to learning it. Solomon took all that which was written of magic, put it in a chest and buried it under his throne after he warned them against it. When Solomon died and all those who knew the incident of burying these writings then passed away after him, a devil appeared in the shape of a human and went to a group among the Children of Israel. He said to them: 'Shall I direct you to an inexhaustible treasure?' When they answered in the affirmative, he said: 'Dig under the throne [of Solomon]'. When they did, they found those writings. Upon unearthing them, the devil said: 'It is by means of these that Solomon controlled the jinn, humans, devils and birds'. The children of Israel used those writings from then on, and it is for this reason that one finds magic more widespread among the Jews. Allah, gloried and exalted is He, absolved Solomon of this deed and revealed this verse”.