In times of war, why do states trade with their enemies? In this dissertation, I argue that states make deliberate choices when setting their wartime commercial policies and that these policies are tailored to match the type of war the state is expecting to fight. Specifically, states seek to balance two goals – minimizing the ability of the opponent to benefit from the security externalities of trade and maximizing revenue from continued trade during the war. As a result, states trade with the enemy in two types of products. First, states trade in products that their opponents take a long time to convert into military capabilities, because the security externalities from this trade will not help the opponent win the war. Second, states trade in products that are essential to the domestic economy but can be gotten only from the opponent, because sacrificing this trade would also impair the state’s long term security. Furthermore, I argue that states revise their wartime commercial policies based on how well they are doing on the battlefield. As the expected length of war increases, the number of prohibited products will increase since the opponent will have more time to benefit military from the gains of trade. Similarly, the closer the war gets to being existentially threatening, the more wartime trade with the enemy the state will be willing to give up to ensure its survival. In order to determine whether the causal mechanisms outlined in this theory explain the decision of states to trade and fight at the same time, I use the comparative case study method. The specific cases being assessed are the Crimean War (1853-1856), World War I and World War II. In addition to the qualitative test of the theory, I put together a dataset of British prohibitions on trade during WWI to assess the product level predictions of the theory, both in the formation of the initial wartime policy and in the changes to that policy during the war.