Espionage is glamorous, and yet stinks. Spies fascinate yet repel us. For every suave James Bond, one finds a Bill Haydon, the traitor in John Le Carré’s extroardinary novel Tinker Sailor Soldier Spy. For every successful and daring operation of disinformation such as that conducted by the Allies in the months leading to D-Day, one finds acts of extortion, blackmail, and theft. Empires, states, kings, princes, have always resorted to ‘the craft’, and always will– in wartime as well as in peace time.In this paper, I aim to start filling that gap, in the specific context of war. I argue that, under certain conditions, espionage not only is morally justified but is morally mandatory, as a tool to decide whether to go to war and how to fight that war. In section 2, I delineate the scope of my inquiry by distinguishing between various forms of espionage. In section 3, I reject contractarian defenses of espionage, which mirror contractarian defences of the rules of war. In section 4, I build on my objections to those arguments and make a first pass at defending espionage by drawing on the resources of just war theory. In ss. 5 to 7, I address some longstanding concerns about this practice, to wit, the claim that to do their job, spies (and their masters) must necessarily engage in inherently objectionable behaviour such as deception and lies, bribery, and blackmail. Such behaviour is bad enough in and of itself (it is said): it is even worse when it aims at persuading enemy combatants or civilians to betray their country. I show that those concerns are sometimes, but not always warranted. In so doing, I refine the case for espionage. Section 8 concludes.