They followed and acted upon it. ‘Ata’ said: They spoke and related it. “During Solomon’s reign,” that is, during his rule and in his time.
The account behind the verse (1) is that the devils wrote down magic and nīranjiyyāt (magical charms) (2) in the name of Asaf ibn Barkhiya: “This is what Asaf ibn Barkhiya taught King Solomon.” They then buried them beneath his place of prayer, until Allah removed kingship from him, while Solomon was unaware of this. When he died, they brought them out and said to the people: “Solomon ruled them only by means of this, so learn it.”
As for the scholars and righteous among the Children of Israel, they said, “Allah forbid that this should be part of the knowledge revealed by Allah!” (3) But the lowly people said, “This is Solomon’s knowledge,” and they turned to learning it, abandoning the books of their prophets. Blame against Solomon became widespread, and this remained their condition and practice until
(1) Ibn Kathir, may Allah have mercy on him, cited a number of reports in his exegesis of the verse, then said: “Reports concerning the story of Harut and Marut have been narrated from a group of the Tabiun, such as Mujahid, al-Suddi, al-Hasan al-Basri, Qatadah, Abu al-Aliyah, al-Zuhri, al-Rabi ibn Anas, Muqatil ibn Hayyan, and others. Many early and later exegetes have recounted it. In its detailed form, however, it ultimately derives from Israelite reports, for there is no sound marfu report, with an uninterrupted chain of transmission to the truthful, trustworthy, infallible Messenger, who does not speak from his own desire. The apparent wording of the Quran relates the story only briefly, without elaboration or prolixity. Thus, we believe in what has come in the Quran according to what Allah Most High intended; and Allah knows best the reality of the matter.” Tafsir Ibn Kathir, 1:249-250.
Qadi Iyad, may Allah have mercy on him, said regarding Harut and Marut: “As for what the historians and transmitters of exegetical reports have mentioned, and what is narrated from Ali and Ibn Abbas concerning their account and their trial through love of a woman, their punishment for what they did, and the magic that occurred: know, may Allah honor you, that none of these reports, whether unsound or sound, has been transmitted from the Messenger of Allah, may Allah bless him and grant him peace. Nor is this a matter that can be established by analogy. As for what is mentioned of it in the Quran, the exegetes have differed over its meaning, and many of the early authorities rejected some of what has been said about it. These reports come from Jewish books and their fabrications, just as Allah states at the beginning of these verses concerning their fabrications against Sulayman and their declaring him an unbeliever. The story contains grave enormities, and we shall, Allah willing, set forth what dispels the obscurity surrounding these difficulties.” He then mentioned several arguments demonstrating the story's falsity and invalidating it. See al-Shifa bi-Tarif Huquq al-Mustafa, by Qadi Iyad, 2:853-859.
After citing the reports about this story in his exegesis, Ibn Atiyyah said: “All of this is weak, and it is far-fetched to attribute it to Ibn Umar, may Allah be pleased with him.” See al-Muharrar al-Wajiz, by Ibn Atiyyah, 1:420. See also the discussion of Shaykh Jamal al-Din al-Qasimi, may Allah have mercy on him, in his exegesis; Ibn al-Arabi, Ahkam al-Quran, 1:27-30; and al-Qurtubi, al-Jami li-Ahkam al-Quran, 2:52. Although some reports occur in the Musnad of Imam Ahmad and elsewhere, they are weak reports and cannot override authentic reports and established principles concerning the angels' protection from sin, even though Imam al-Tabari, al-Tha'labi, and al-Baghawi did not comment on them. See Lubab al-Tafsir, by Mahmud ibn Hamzah al-Kirmani, 1:369, edited by Dr. Nasir ibn Sulayman al-Umar.
(2) It has an effect resembling magic, but it is not actually magic; rather, it is imitation and deception. Al-Qamus.
(3) This is how it appears in manuscript (A). Manuscript (B), as well as the printed edition, reads “Sulayman,” which is correct.