**"And they followed what the devils recited..."**
"And they followed what the devils recited during the reign of Solomon."
Meaning: They cast aside the Book of Allah and followed the books of sorcery and witchcraft that the devils used to recite.
"During the reign of Solomon."
Meaning: During the era of his kingdom and his time. The devils used to eavesdrop, mix what they heard with lies they fabricated, and cast them to the soothsayers, who recorded them in books. This spread during the time of Solomon (peace be upon him) to the point that they claimed the Jinn possessed knowledge of the unseen. They would say, "This is Solomon’s knowledge; his kingdom was only established through this, and by it, he subjugated humans, Jinn, and the wind that blew by his command."
"And Solomon did not disbelieve."
This is a refutation of the devils and a rejection of the slander they leveled against Solomon by attributing sorcery and its practice to him, which they labeled as disbelief.
"But the devils disbelieved."
They are the ones who disbelieved by practicing sorcery and recording it.
"Teaching people sorcery."
They intended by this to seduce and lead them astray.
"And what was revealed to the two angels in Babylon, Harut and Marut."
This is a conjunction linked to "sorcery"—meaning they taught them what was revealed to the two angels. It is also said to be a conjunction linked to "what the devils recited"—meaning they followed what was revealed to the two angels.
"Harut and Marut."
An explanatory apposition for the two angels. What was revealed to them was the knowledge of sorcery as a trial from Allah for the people. Whoever learned it and practiced it was a disbeliever, and whoever avoided it—or learned it not to practice it, but to guard against it and not be deceived by it—was a believer.
(I learned evil, not for the sake of evil, but to guard against it.)
This is like how the people of Talut were tested by the river: "Whoever drinks from it is not of me, and whoever does not taste it is indeed of me" (Al-Baqarah: 249).
"And they [the two angels] do not teach anyone until they warn him and advise him, saying, 'We are but a trial [fitnah], so do not disbelieve.'"
Meaning: We are a test and an examination from Allah. Do not learn this while believing it to be the truth, for then you would disbelieve.
"So they learn from them that by which they cause separation between a man and his wife."
Meaning: The knowledge of sorcery that becomes a cause for separation between spouses through tricks and deception, such as blowing on knots and similar things. Allah causes aversion, defiance, and discord to occur at the time of these acts as a trial from Him—not that sorcery has an inherent effect of its own.
"But they do not harm anyone through it except by permission of Allah."
Because Allah may cause an effect to occur at the time of the act, or He may not.
"And they learn what harms them and does not benefit them."
Because they intend evil by it. This implies that avoiding it is more righteous, similar to learning philosophy, which one cannot be certain will not lead to deviation.
"And they certainly knew that whoever purchased it..."
Meaning: Whoever exchanged the Book of Allah for what the devils recited.
"Has no share in the Hereafter."
No portion.
"And wretched is that for which they sold themselves."
Meaning: They sold their souls.
Linguistic Notes:
- Harut and Marut: These are non-Arabic names, evidenced by their being diptotes (ghayr munsarif). If they were derived from hart (breaking), they would be triptotes.
- "And they certainly knew" vs. "If only they knew": If you ask how their knowledge is affirmed in the first instance and then denied in the second, I say: the meaning of the second is "if only they acted upon their knowledge." When they failed to act, it was as if they were stripped of that knowledge.