Islamic Fiqh > Penalties (hudud) > Safe conduct, prisoners and espionage > Espionage in wartime
Contents
Updated on 27 September 2026 at 3:52 AM
The spy is the one who observes the weak points of the Muslims and carries their news to the enemy. The jurists classify his status by his religion and his legal standing: combatant, Muslim, treaty-holder or protected subject, and the treatment varies accordingly.
This sheet defines espionage, establishes the fate of the combatant spy, then that of the Muslim spy, and finally that of the spy bound by a treaty or under protection.
In the language, ar-Razi writes in Mukhtar as-sihah that jaassahu bi-yadihi means he touched it, and jaassa al-akhbar wa-tajassasaha that he examined them, whence the name of the spy. Al-Fayruzabadi says in al-Misbah al-munir that the spy tracks reports and probes hidden realities, the word later extending to direct observation. At-Tarabulsi writes in Taj al-'arus that jass is the examination of reports, that the form with j speaks of searching for weak points and that with h of listening, both senses joined in the quest for information; the spy is the bearer of the evil secret. Ibn al-Athir says espionage is the probing of the hidden realities of things (Mukhtar as-sihah p. 44, al-Misbah al-munir 1/101, Taj al-'arus 15/499, an-Nihaya 2/272). All these senses revolve around tracking information, verifying it and probing secrets.
Counted as espionage, then, are: observing the weak points of the Muslims, in al-Fayruzabadi's sense that the weak point on a frontier or in war is the breach whose exploitation is feared; transmitting information classed as secret in wartime, as when a man writes to the enemy that a given spot of the Muslims is poorly guarded so that they may come by it, the example ad-Dardir gives in ash-Sharh al-kabir (2/205); and seeking information on the military situation of the Muslim army or state, as ash-Shafi'i writes in al-Umm (4/249) of the man who writes to the polytheists that the Muslims intend to attack them, once the state surrounds its preparations with secrecy and one of them betrays it, as Hatib ibn Abi Balta'a did, whose story follows. The archetype is the spy who shared the Muslims' meal at Hunayn, as they prepared against Hawazin, to survey their army:
A spy of the polytheists came to the Prophet while he was on a journey; he sat with his companions and spoke with them, then rose and left. The Prophet said: seek him and kill him. He was killed, and the Prophet assigned his spoils to the one who killed him.
reported by al-Bukhari (2886)
We went out on an expedition with the messenger of Allah against Hawazin. While we lunched with him, a man came on a red camel, tethered it with a lace drawn from his bag, then stepped forward and lunched with the men, looking about, among us weakness and softness of loins, some of us on foot. He left briskly, went to his camel, untied it, mounted and drove it off. A man on a white she-camel gave chase; I set out after them and advanced until I took the camel's bridle and tethered it. When its knee touched the ground, I drew my sword and struck the man's head, and it rolled. I came back with the camel, carrying his belongings and his arms, and the messenger of Allah met me with the people. He asked who had killed the man; they said: Ibn al-Akwa'. He said: the spoils are all his.
reported by Muslim (1754)
Ahmad (16584) and Ibn Hiban in his Sahih (4843) add, in the same account, that the man "mounted his camel and rode off at speed, for he was a scout of the polytheists". Ibn Hajar writes that the scout is the one sent to the enemy to survey his condition, the word covering the kind and the individual (Fath al-Bari 6/52). Espionage thus targets information from which the enemy could derive harm to the Muslims, tied to their weak points, to what is meant to be hidden from him and to the military posture of the state, and not access to public information: knowing of sporting contests or cultural gatherings, activities in plain sight that the state does not hide from the enemy even in wartime, is not espionage. In sum, espionage is the attempt to obtain the information of war or preparation that the state keeps hidden, whether the attempt succeeds or fails, and whether or not the information is transmitted.
There is no disagreement among the scholars on the lawfulness of killing the polytheist combatant spy, on the hadith of Salama ibn al-Akwa' cited above. An-Nawawi writes: in this hadith stands the killing of the polytheist combatant spy, a thing established by the consensus of the Muslims; in an-Nasa'i's version, the Prophet had ordered him sought and killed (Sharh Muslim 12/67).
No known scholar states that the Muslim spy disbelieves by the mere fact of spying. Ash-Shafi'i states expressly that the disagreement over his apostasy carries no weight: revealing a weak point of the Muslims, or aiding a polytheist so that he beware of a raid, or engaging in harm to the Muslims through open disbelief, does not make the Muslim an apostate; asked whether he spoke from report or reasoning, he said he held it from a source no learned Muslim may contradict by the stated Sunna after the Book (al-Umm 4/249). Ibn al-'Arabi and al-Qurtubi write that one who often surveys the weak points of the Muslims and informs their enemy is not thereby a disbeliever if his aim is a worldly interest and his creed remains sound, as Hatib ibn Abi Balta'a did when he sought support without intending apostasy (Ahkam al-Qur'an 4/225, Tafsir al-Qurtubi 18/53). An-Nawawi writes: in the hadith of Hatib stands the fact that the spy and the rest of the authors of great sins do not disbelieve by it, and that this spying is a great sin beyond doubt, for it includes harm to the Prophet (Sharh Muslim 16/55). Ibn Taymiyya adds that an alliance with the enemy for kinship or need is a sin that diminishes faith without being apostasy, as with Hatib, over whom Allah revealed: "O you who believe, take not My enemy and your enemy for allies, showing them affection" (Surah al-Mumtahina 1, Majmu' al-fatawa 7/523).
As for his killing, the jurists hold five views. The first: the Muslim spy is not killed, but suffers a disciplinary penalty, the view of the Hanafis, the Shafi'is and the apparent position of the Hanbalis. Abu Yusuf writes to the caliph Harun ar-Rashid: you asked, commander of the believers, about spies: if they belong to the people of Islam and are known men, inflict on them a painful penalty and extend their imprisonment until they repent (Kitab al-kharaj of Abu Yusuf p. 205-206). The Sharh as-Siyar al-kabir says: if the Muslims find a man who professes Islam, a spy of the polytheists over the Muslims who writes to the enemy their weak points and admits it of his own will, he is not killed, but the imam inflicts a painful penalty on him. The proof is the hadith of Hatib, who wrote to the Quraysh that the Prophet was about to attack them; the Prophet said to 'Umar: "Patience, 'Umar; it may be that Allah has looked upon the people of Badr and said: do as you please, I have forgiven you." Had he been a disbeliever liable to death, the Prophet would not have spared him, veteran of Badr or not, and had he incurred a fixed punishment, the Prophet would not have suspended it (Sharh as-Siyar al-kabir 5/2041). Ash-Shafi'i writes: the blood of one whose inviolability through Islam is established is lawful only if he kills, or fornicates after wedlock, or disbelieves with open disbelief after faith and persists; and revealing a weak point of the Muslims falls under none of these (al-Umm 4/249). An-Nawawi reports that ash-Shafi'i, al-Awza'i, Abu Hanifa, some Malikis and the majority of the scholars hold that the imam punishes him with flogging, imprisonment or the like, and that killing him is not lawful (Sharh Muslim 12/67). Ibn Taymiyya notes that Malik and some of Ahmad's companions, like Ibn 'Aqil, permitted his execution, Ahmad suspending judgment, and that judge Abu Ya'la forbade it with Abu Hanifa and ash-Shafi'i (Majmu' al-fatawa 28/345, Minhaj as-sunna 6/175, al-Furuq 6/114). Ibn al-Qayyim confirms: ash-Shafi'i and Abu Hanifa say he is not killed, and this is the apparent view of Ahmad (Zad al-ma'ad 3/422-423).
The second view makes the killing of the Muslim spy obligatory without condition, the view of Sahnun and Ibn al-Qasim among the Malikis. Sahnun says: if a Muslim writes to the enemy, he is killed without interrogation, and his property goes to his heirs. Ibn al-Qasim says: he is killed and no repentance is received for it; he is like the heretic (Zad al-ma'ad 5/64). Al-Kharshi writes that the well-known view is that the Muslim exposed as a spy takes the ruling of the heretic: killed when exposed, his repentance not accepted (Sharh Mukhtasar Khalil 3/119).
The third view, within the Maliki school, makes his killing obligatory if he pursued spying before announcing repentance, or if spying is his habit. Ash-Sharh al-kabir says: the Muslim spy is like the heretic, killed when exposed with no repentance accepted, though accepted if it comes before exposure. The Minah al-Jalil specifies: like the heretic in the obligation of killing him even if he announces repentance after being found out, and in accepting repentance before (ash-Sharh al-kabir 2/182, Manh al-Jalil 3/163).
The fourth view makes habit the criterion: if it is his habit he is killed, otherwise not, the view of Abd al-Malik ibn Majishun. Ibn al-'Arabi reports it: Abd al-Malik said that if it is his habit, he is killed, for he is a spy. Al-Qurtubi explains that repetition was retained because Hatib was caught at his first act (Ahkam al-Qur'an 4/225, Tafsir al-Qurtubi 18/53).
The fifth view holds his killing permitted without being obligatory, the matter falling to the imam's reasoning: the view of Malik, Ibn 'Aqil and Ibn al-Qayyim's choice. Malik said the imam exercises his choice, and he also said the spy is killed, a view sustained by the harm he does the Muslims and his pursuit of corruption on earth (Ahkam al-Qur'an 4/225, Tafsir al-Qurtubi 18/53). Ibn Taymiyya writes: killing the Muslim spy is permitted when the interest requires it, the view of Malik and of some of Ahmad's companions like Ibn 'Aqil (Majmu' al-fatawa 35/405). The proof of this view is the story of Hatib, reported by al-Bukhari (2845, 3762) and Muslim (2494): 'Ali relates that the Prophet sent him with az-Zubayr and al-Miqdad after a woman of the polytheists carrying Hatib's letter to them; they compelled her to draw it from her braid, brought it to the Prophet, and 'Umar asked that Hatib's neck be struck for betraying Allah, His messenger and the believers. Hatib answered that he had never doubted his faith, but wanted a hold among the people to shield his family and property, since none of the companions lacked one. The Prophet said: "He spoke truly; say nothing to him but good," and to 'Umar: "What do you know? It may be that Allah has looked upon the people of Badr and said: do as you please, Paradise is owed you." 'Umar wept and said: Allah and His messenger know best. Ibn Hajar writes that 'Umar's request for Hatib's execution establishes the lawfulness of killing the spy even if a Muslim, the view of Malik and his partisans: the Prophet confirmed 'Umar's intent to kill him, and named as the only impediment his part in Badr, an impediment absent for anyone but Hatib; had Islam barred his killing, the Prophet would have relied on the stronger impediment (Fath al-Bari 8/635). Ibn al-Qayyim writes: in this hadith stands the permission to kill the spy even if a Muslim, for 'Umar asked the Prophet for Hatib's death and the Prophet did not answer that his Islam forbade it, but named another impediment, which points to the permission of killing any spy lacking that impediment (Zad al-ma'ad 3/422-423).
Two views stand opposed. The first makes his killing obligatory: the view of the Malikis, of Abu Yusuf among the Hanafis, and of the express Hanbali position. Abu Yusuf writes to the commander of the believers: if they are of the people of war, or of the protected subjects paying the poll tax among the Jews, Christians and Magians, strike their necks (Kitab al-kharaj p. 205). The Minah al-Jalil says: the spy who reveals the weak points of the Muslims is killed if he does not convert, whether he was a protected subject of ours or a combatant; the safe-conduct neither includes nor requires his quality as a spy, his covenant is not renewed, and his killing becomes obligatory, unless he converts (Manh al-Jalil 3/262-263, ash-Sharh al-kabir 2/182). Asbagh said: the combatant spy is killed, and the Muslim spy and the protected subject are punished, unless they ally against Islam, when they are killed, per Ibn al-'Arabi and al-Qurtubi (Ahkam al-Qur'an 4/226, Tafsir al-Qurtubi 18/53). Sahnun says in the at-Taj: if we find in the land of Islam a protected subject who writes to the polytheists the weak points of the Muslims, he is killed, as an example to others (at-Taj wa-l-iklil 3/385, Bilghat as-salik 2/203). Al-Kharshi writes the same: the covenant is broken for him, whether he was protected and then exposed as a spy, or entered among us under a safe-conduct, for protection neither includes nor requires espionage; unless the imam prefers enslavement, and his killing is possible if he does not convert (Sharh al-Kharshi 3/119, Mawahib al-Jalil 3/357). Ibn Qudama writes: whoever shelters the polytheists' spies, or aids them against the Muslims by revealing their weak points or corresponding with them, breaks the covenant; and whoever breaks his covenant in this way sees his blood made lawful, the imam choosing among four options, killing, enslavement, ransom and favor, as with the prisoner of war, a ruling reserved to the breaker alone and not to his offspring, since the breaker alone broke it (al-Mughni 9/283-284, al-Kafi 4/370-371). Az-Zarkashi classes the passing of information to the polytheists and the sheltering of a spy among the acts that break the covenant even without a clause, like drawing a Muslim from his religion, killing him, brigandage on his road, union with a Muslim woman, or reviling Allah, His book, His religion or His messenger (Charh az-Zarkashi 3/230). The proof of the first view is the hadith of Abu Dawud (2652) under the heading of the protected spy: Haritha ibn Mudarrib related that Furat ibn Hayyan was a spy of Abu Sufyan and an ally of an Ansari; the Prophet ordered his killing, and when he passed a circle of Ansar saying he was a Muslim, the Prophet answered the Ansari who attested him: "There are men among you whose faith We leave to them; Furat ibn Hayyan is one." The hadith shows the Prophet had ordered his killing.
The second view says he is not killed: the view of Muhammad ibn al-Hasan ash-Shaybani and the sahih position of the Shafi'is, unless abstention from spying was stipulated in his pact, in which case he is killed on the preponderant view. Sarakhsi writes in the Sharh as-Siyar al-kabir: if he does this while protected, he suffers a painful penalty and is held in prison, without his covenant being broken, for a Muslim who did this would not break a trust, and neither does the protected subject; were he to cut the road, killing and taking, no covenant would be broken either, though brigandage be war against Allah and His messenger; likewise spying does not break the safe-conduct, but he suffers a penalty in every case, having done the unlawful and aimed at harming the Muslims. If the Muslims had said to him when granting protection: we protect you unless you are a spy, or: if you reveal our weak points your protection falls, then he may be killed, the conditioned thing being absent before the condition is met. The imam may crucify him as an example, or make him fay' like the other prisoners, though killing him for the example is better. If the spy is a woman, she may be killed, for she aimed at harming the Muslims at large, and the combatant woman may be killed in this case as if she fought, though crucifying her is disliked, her modesty being better veiled. If it is an underage boy, he is made fay' and not killed, not being addressed by the law, his act not being the treachery punishable by death; he is like the boy who fights and is taken captive without being killed, unlike the fighting woman taken captive, who may be killed, and the sane aged man who does not fight follows the woman's rule, being addressed by the law (Charh as-Siyar al-kabir 5/2041-2042). The Muhadhdhab of ash-Shirazi reports: if the protected subject harms the Muslims by revealing their weak points and abstention was not stipulated in the pact, the pact is not broken, it standing through the poll tax, the application of the Muslims' laws and abstention from fighting them; if it was stipulated, two views stand, one that the pact is not broken, the other that it is. And if the pact is broken, two views again: sending him back to his place of safety, or, the sahih view, not sending him back, since he is a polytheist without protection, the imam choosing among killing, enslavement, favor and ransom (al-Muhadhdhab 2/257). An-Nawawi reports that Malik and al-Awza'i declare him a covenant-breaker whom the imam may enslave or kill, while most scholars hold the covenant unbroken, the Shafi'is excepting the case where the breach was stipulated. Ibn Hajar summarizes: if it was stipulated, the breach is unanimous (Charh Muslim 12/67, Fath al-Bari 6/169).
The chapter on espionage describes a classical institution of war, in which the protection of a state's military secrets carried the spy's life with it. No contemporary authority applies these rules, and a Muslim living in a modern country is bound by its laws, including those protecting state secrets. The essential to retain: fidelity to the covenant and the ban on treachery, the great sin of betraying one's own people, and the jurists' distinction between revealing a secret of war and public information.