Al-Azhar House of Fatwa stated that: “Muslim jurists hold different opinions regarding the Shari`ah ruling on a person who spies on Muslims and reports (to non-Muslims) their situation, particularly those secrets that are related to the defense of Muslim countries. Imam Ash-Shafi`i, Abu Hanifah and Ahmad are of the view that a Muslim spy should not be killed. However, Imam Malik, Ibn al-Qayyim (a follower of Imam Ahmad’s School of Fiqh), and others hold the view that it is permissible to kill the Muslim spy.
The second group of scholars cite the incident of Hatib ibn Abi Balta`ah in support of their view. Al-Bukhari and Muslim reported that `Ali ibn Abi Talib said: Allah’s Messenger sent me, Az-Zubayr and Al-Miqdad somewhere saying, “Proceed till you reach Rawdat Khakh. There you will find a lady with a letter. Take the letter from her.” So, we set out and our horses ran at full pace till we got to Ar-Rawda where we found the lady and said (to her). “Take out the letter.” She replied, “I have no letter with me.” We said, “Either you take out the letter or else we will take off your clothes.” So, she took it out of her braid. We brought the letter to Allah’s Messenger and it contained a statement from Hatib ibn Abi Balta`ah a to some of the pagans of Makkah informing them of some of the intentions of Allah’s Messenger. Then Allah’s Messenger said, “O Hatib! What is this?” Hatib replied, “O Allah’s Messenger! Don’t hasten to give your judgment about me. I was a man closely connected with the Quraysh, but I did not belong to this tribe, while the other emigrants with you had their relatives in Makkah who would protect their dependents and property. So, I wanted to recompense for my lacking blood relation to them by doing them a favor so that they might protect my dependents. I did this neither because of disbelief not apostasy nor out of preferring kufr (disbelief) to Islam.” Allah’s Messenger, said, “Hatib has told you the truth.” `Umar said, “O Allah’s Messenger! Allow me to chop off the head of this hypocrite.” Allah’s Messenger said, “Hatib participated in the Battle of Badr, and who knows, perhaps Allah has already looked at the Badr warriors and said, “Do whatever you like, for I have forgiven you.”
Thereupon Allah revealed the Qur’anic verse, “O ye who believe! Choose not My enemy and your enemy for friends…” (Al-Mumtahanah: 1) In this verse Allah has forbidden befriending non-Muslims if their enmity is known. Almighty Allah says: “Allah forbiddeth you only those who warred against you on account of religion and have driven you out from your homes and helped to drive you out, that ye make friends of them.” (Al-Mumtahanah: 9)
After mentioning the hadith about Hatib’s incident in his book, Zad al-Ma`ad, Imam Ibn al-Qayyim comments, “This hadith is used as a proof by those who hold the view of killing the spy such as Malik, Ibn `Aqil (the follower of Imam Ahmad) and others. They argued that he was excused from killing not because it was not permissible but due to another reason which does not apply to others. Were Islam to prevent killing a spy, it would not make it exceptional (in the case of Hatib) because of a particular reason (i.e. it would not have been stated that he was not to be killed because he witnessed the Battle of Badr).”
In Ibn Farhun’s Tabsirat al-Hukkam, Sahnun said that a Muslim who writes to the inhabitants of Dar al-Harb (the abode of war, i.e., the enemies of the Muslims) about the Muslim situation and conditions should be killed even without being asked to repent. Also, there is no compensation or blood money to be given to his heirs just as in the case of muharib (those who launch war against M
uslims and spread corruption in the land).
The author of Nayl al-Awtar recorded this same hadith stating that it is agreed upon. Commenting on the hadith, he said that it indicates that it is permissible to kill the spy and constitutes evidence for those who hold that it is permissible to kill the spy even if he is a Muslim.
In his commentary on Sahih al-Bukhari entitled Fath al-Bari, Ibn Hajar writes: “When the Prophet said, ‘Hatib participated in the Battle of Badr!’, thereupon `Umar (may Allah be pleased with him) said, ‘Yet he has broken his pledge and aided your enemy.’ Then the Prophet added: ‘Who knows, perhaps Allah has already looked at the Badr warriors and said, Do whatever you like, for I have forgiven you.’”
In fact, this hadith gives weight to the opinion of those who permit killing the spy, citing it in support as we have explained. Moreover, spying on Muslims for the interest of their enemies is an act that endangers Muslim interests and lands. It is a way of spreading corruption. In respect to the punishment of those who make war upon Allah and His Messenger and strive after corruption in the land, Almighty Allah says: “The only reward of those who make war upon Allah and His Messenger and strive after corruption in the land will be that they will be killed or crucified, or have their hands and feet on alternate sides cut off, or will be expelled out of the land. Such will be their degradation in the world, and in the Hereafter theirs will be an awful doom…” (Al-Ma’idah: 33) ”
In his commentary on the Qur’an, Ibn Jarir at-Tabari elaborates on the occasion of the revelation of this verse as explained by Ibn `Abbas (may Allah be pleased with him) who said: A group of the People of the Book had made treaties of cooperation and alliance with the Prophet but they broke their treaties and spread corruption in the land. Therefore, Allah gave the Prophet the option to execute them or cut off their hands and feet on alternate sides. A similar narration is reported on the authority of other than Ibn `Abbas.
Al-Qurtubi, in his exegesis, explains that scholars have differed regarding those who can be described as muharib. Imam Malik defines a muharib as the one who attacks people whether it is in a city or highway and forces them to give up their money and lives, without any enmity or cause for revenge being between him and these people.
Imam Ash-Shafi`i and Abu Thawr view that the verdict on a muharib is valid whether his crime occurs in cities, houses, highways, or against the inhabitants of deserts and villages. Ibn Al-Mundhir comments on this view stating that this is true because the crime of a muharib applies to all these cases, as the Qur’anic verdict is general and no one has the authority to make exceptions without valid evidence.
However, another group are of the view that this crime only exists outside cities. This is the opinion of An-Nawawi, Is-haq, and An-Nu`man.
Moreover, scholars have differed regarding the punishment of the muharib. Some of them are of the view that the punishment should be in accordance with the gravity of his crime. However, Abu Thawr, Malik and many Companions of the Prophet are of the view that the imam (ruler) has to choose one of the options, taking support from the apparent meaning of the verse.
It is to be concluded from the above discussions that there are two opinions regarding the punishment of the muharib. The first is that the punishment should be determined according to the gravity of his crime; and the second is that the Muslim ruler (or judge) is to choose one of the punishments mentioned in the verse in accordance with its apparent meaning. The wisdom behind the severity of the punishment for those who launch war against Allah and his Messenger (i.e., against Muslims who are their followers and supporters) and spread corruption in the land is to guarantee the security of Muslims and their lands.
A person who spies on Muslims, contacts their enemy and gives them military secrets that benefit them in oppressing Muslims and inflicting harm on the Muslim lands deserves to be dealt with like those who make war upon Allah and His Messenger and strive after corruption in the land. Each nation has its own military system and the public interest necessitates that military secrets be kept and hidden from its enemies. These secrets should not be known save to those who, due to the nature of their job, are connected with these secrets. If any citizen is lured to explore such secrets in his own ways and convey them to the enemies of his country, then he is a spy who spreads corruption in the land. This is because revealing such secrets to the enemies will enable them to attack Muslims, undermine their strength, or even to occupy Muslim lands, Allah forbid, and hold sway over them.”