Thus, the Prophet ﷺ counted sorcery among the destructive sins and placed it immediately after associationism.
Sorcery is disbelief, for Allah relates that the Jews exchanged the Book of Allah for sorcery. He says:
“When a messenger from Allah came to them confirming what they already possessed, a group of those who had been given the Scripture cast the Book of Allah behind their backs as though they did not know, and they followed what the devils recited during the reign of Solomon. Solomon did not disbelieve; rather, the devils disbelieved, teaching the people sorcery.” (Al-Baqarah 101–102)
Sorcery, then, is the work of devils and is itself disbelief. In the same passage He says:
“Nor would they teach anyone until they had said, ‘We are but a trial, so do not disbelieve.’” (Al-Baqarah 102)
This shows that teaching sorcery is an act of disbelief. And at the end of the verse He states:
“They were well aware that whoever purchased it would have no share in the Hereafter.” (Al-Baqarah 102)
—that is, no portion whatsoever.
This proves that a sorcerer who does not repent to Allah has no share in the Hereafter; he is a disbeliever. Sorcery is disbelief, and on this basis it is not valid to pray behind a sorcerer unless he repents to Allah, abandons sorcery, and returns with genuine repentance. The same ruling applies to anyone who believes in sorcery—such is his status, and we seek refuge in Allah.
In short, sorcery is the gravest of the major sins after associationism. It is disbelief in Allah and the twin of associationism, for it repudiates faith in Allah, as He has stated in His noble Book. The sorcerer and the one who accepts sorcery are equal in this regard.
Concerning the attempt to remove sorcery by means of more sorcery, the sounder of the two scholarly opinions is that it is impermissible, because treatment must be sought through what is lawful and permitted, and Allah has not placed the cure of the Muslims in what He has forbidden to them.