And magic divides into two types:
The first type: Magic whose performer connects with the devils. This one must commit shirk and he must commit kufr, because the magician, when he connects with the shaytan (disbelieving jinn), the shaytan is not pleased with anything from him less than kufr. There is a contract and tie between the magician and the devil Jinn. The magician is tied to the shaytan by way of kufr - and refuge is with Allaah - he seeks from him that he disbelieves in Allaah, abandons his religion, that he should revile Allaah and revile the Messenger (alayhis salaatu wassalaam), or that he should sacrifice to other than Allaah, or seek nearness to him by that which is from the special, unique (rights) of Allaah, or he may request from him to urinate on the mushaf (copy of the Qur'an), or cover it with impurity - and refuge is with Allaah - so he requests disbelief from him and this is a must. This is a contract between the magician and the shaytan, and the binding necessity from this contract is that the shaytan will request the magician to disbelieve in Allaah, to commit shirk, then by way of this requirement the shaytan will serve the human, he will serve the magician with what he desires, he will respond to his requests. When he requests him to afflict a person, he will afflict him, when he requests him to kill a person, he will kill him, he will inform him about unseen things which are not in the city, but which are from the city, not from the unseen things that only Allaah knows, but unseen things that are not known to this society and in this city but are known in another place, he will bring that information to him, and the shaytan may also steal things for him or certain types of scents.
The second type of magic: Magic whose performer does not connect with the devil, but this magician does unlawful acts in that he cures people or treats some people with medicines, with things that harm them, and he consumes their wealth in falsehood, or he treats them with medicines that harm the people, they bring about harm in their bodies and hearts, and eats the wealth of the people in falsehood.
Built upon this classification, the ruling upon a magician varies, the magician who connects to the devils, no doubt he is a disbeliever, Allaah, the Mighty and Majestic said, "Sulaimaan did not disbelieve, but the Shayaateen (devils) disbelieved, teaching men magic" (2:102) And He the Sublime and Exalted said, "And from these (angels) people learn that by which they cause separation between man and his wife" (2:102), and He, the Sublime, said "And indeed they knew that the buyers of it (magic) would have no share in the Hereafter" (2:102) so He explained - the Sublime and Exalted - that the devils disbelieved by teaching magic, "But the Shayaateen (devils) disbelieved, teaching men magic" (2:102) and He explained that from the actions of the magicians is to separate between a man and his wife, then He, the Sublime and Exalted, said, "But they could not thus harm anyone except by Allah's leave" (2:102). So the magician cannot harm anyone except by Allaah's permission, the Mighty and Majestic, that which is kawnee qadaree [His permission that relates to what He allows to take place irrespective of whether He is pleased with it or not], and He, the Sublime and Exalted, explained that the magician has no share in the hereafter, he has no portion thereof.
And magic is from the traits of the Jews, He, the Sublime and Exalted, said in describing the Jews, "Have you not see those who were given a portion of the book, they believe in al-Jibt and al-Taghut (referring to magic and the devil) and they say about those who disbelieve, 'They are more guided than those who believe'." (4:51). Umar (radiallaahu anhu) said, "al-Jibt is magic and al-taghut is Satan. And al-Jibt can be applied to magic and to everything in which there is not good. And Jabir (radiallaahu anhu) said, "The tawaagheet are the soothsayers, the devil would descend upon them in every valley."
As for the magician that does not connect to the devils, then this also has detail to it. He is one who commits a major sin from the major sins in any case by doing this in that he harms the people with his magic and his potions which he uses and he eats the wealth of the people in falsehood. So if he declares it lawful to harm the people and declares it lawful to eat their wealth in falsehood, then he is a disbeliever. Because harming people is known by necessity in the religion to be unlawful, and likewise consuming the wealth of the people in falsehood, whoever makes it lawful has disbelieved.
Whoever declared usury or bribery to be lawful and said, "It is halaal", or declared lawful the taking of people's wealth in falsehood (then) he has disbelieveed, so he becomes an apostate, and refuge is with Allaah. Because he did an invalidating action from amongst the invalidators of Islaam. So this magician who does not connect with the devils, if he declares it lawful to consume the wealth of the people in falsehood, he has disbelieved, or if declared harming people to be lawful, he has disbelieved. And if he did not declare that to be lawful but his soul and the devil beguiled him and his inclination to consume others' wealth in falsehood overcame him whilst he knows it to be unlawful, he knows it is not permissible to consume the wealth of the people in falsehood, and he knows it is not permissible to harm the people, he believes all of this but greed, boldness, love of wealth overcame him and he did what he did until he earned wealth, then such a person is a perpetrator of a sin amongst the major sins.
For this reason the majority of the Scholars are of the view of the disbelief of the magician, and the three Imaams (may Allah have mercy upon them) have gone to this view, Abu Haneefah, Maalik and Ahmad, they said that when he learns magic, he disbelieves, he diselieves by learning magic, due to the saying of Allaah the Exalted, "But the Shayaateen (devils) disbelieved, teaching men magic" (2:102) and due to His saying, the Sublime and Exalted about the two angels, "Verily, we are a tribulation, so do not disbelieve..." (2:102), meaning, do not disbelieve by learning magic. The companions of Imaam Ahmad said, "Unless his magic is with medicines and potions that harm, then he does not disbelieve" since he does not connect with the devils. And as for Imaam al-Shaafi'ee (rahimahullaah) he made tafseel (detail) and said:
When he learns magic, we say to him 'Describe your magic to us' and if he describes what necessitats disbelief, he disbelieves, and if he describes what does not necessitate disbelief, then if he declares that to be lawful, he disbelieves and if he does not declare that to be lawful, then he has committed what is unlawful and a major sin.
And from here it becomes clear that by consensus and complete agreement, when a magician's magic comprises kufr he is a disbeliever, when his magic comprises kufr in that he seeks nearness to the devils which that which is from the unique and specific rights of Allaah, he falls into a nullifier from the nullifiers of Islaam, then he is a disbeliever by consensus.
However (the apparent) difference between the Scholars is based on the meaning of "sihr" (magic). The majority of the Scholars hold that the linguistic (meaning) of magic (sihr) does not enter the meaning of magic (intended in the Shari'ah), so he uses potions and the inhalation of smoke and he does not connnect with the devils, this is not to be labelled as "sihr" (magic), it is not labelled as "sihr" legislatively, even if it is labelled "sihr" linguistically. For this reason they said, "Every magician is a disbeliever in all situations," the majority of the Scholars said, "The magician is a disbeliever in all situations," why? Because it is necessary for his magic to comprise shirk and kufr, because he connects with the devils.
As for al-Shafi'ee, then he entered the linguistic meaning of magic into the (legislative) meaning of magic, for this reason, he distinguished, so al-Shafi'ee (rahimahullaah), he said, "If his magic comprises kufr, he disbelieves, and if it does not comprise kufr, then he does not disbelieve", because he entered linguistic meaning of magic into the (legislative) meaning of magic, hence he required tafseel (making clarification, distinction). As for the majority, they did not require making distinction because they did not enter the linguistic meaning of magic into the legislative meaning of magic.
So from this it becomes clear that there is no difference between the Scholars that when the magician's magic comprises kufr, then he is a disbeliever with the four Imaams and others, Maalik, al-Shafi'ee, Abu Haneefah and Ahmad. All of them say, when his magic comprises kufr, he disbelieves, in that he seeks closeness to the devil with what he loves, or he urinates on the mushaf or places it under his feet, this is disbelief by consensus. However, when his magic (does not involve) connecting to the devils, this is the one wherein there is clarification [as to whether he makes his act lawful or not]. Likewise, when (his magic) comprises calling upon the stars, or calling upon other than Allaah, or he calls upon the seven stars, as was done by the people of Babylon, then this is a disbeliever by consensus.
And it is established in the authentic hadeeth from the Prophet (sallallaahu alayhi wasallam) that he said, "Avoid the seven destroyers" and they said, "What are they O Messenger of Allaah" and he said, "Shirk with Allah, and magic, and killing a soul which Allaah made unlawful except with due right, consuming usury, consuming the wealth of an orphan, deserting the battlefield, and accusing chaste, innocent believing women (of lewdness)." And al-ijtinaab (avoid) is (explained by) al-mubaa'adah (keeping distant from), and this more far-reaching (in meaning) than merely saying, "Do not do...", (rather he said), "Avoid", meaning "Keep distant from and do not come near to it", "Avoid the seven destroyers," meaning those that cause destruction, they are labelled as mubiqaat (destroyers) because they cause their perpetrator to be destroyed, they make the perpetrator fall into mighty sin and then into the Fire, we seek refuge in Allaah. So he began with Shirk, they said, "What are they O Messenger of Allaah?" He said, "Shirk with Allaah," when he calls upon other than Allaah, sacrifices to other than Allaah, makes oath to other than Allaah, he has committed shirk. Then magic which is the second affair, and it is a type of shirk when its performer connects with the devils.