Espionage has been a recognised part of warfare since ancient times. Throughout its codification and development, the law and customs of war have recognised both the necessity of intelligence collection during armed conflict and the danger that spies pose to the security of the state; resulting in the lawfulness of wartime espionage at the state level as well as the right to punish individual captured spies for their actions. This chapter addresses the definition of spies under international humanitarian law (IHL), and their subsequent treatment when captured. While captured spies are not entitled to prisoner of war status and may be the subject of derogations from certain rights under IHL, they are not entirely without legal protections. For example, a spy cannot be kept entirely incommunicado and retains the right to humane treatment and a fair trial. How the law will continue to evolve to address modern day espionage during armed conflict remains to be seen.