We develop a dynamic theory of resource wars and study the conditions under which such wars can be prevented. Our focus is on the interaction between the scarcity of resources and the incentives for war in the presence of limited commitment. We show that a key parameter determining the incentives for war is the elasticity of demand. Our first result identifies a novel externality that can precipitate war: price-taking firms fail to internalize the impact of their extraction on military action. In the case of inelastic resource demand, war incentives increase over time and war may become inevitable. Our second result shows that in some situations, regulation of prices and quantities by the resource-rich country can prevent war, and when this is the case, there will also be slower resource extraction than the Hotelling benchmark (with inelastic demand). Our third result is that limited commitment implies that regulation of prices and quantities might actually precipitate war even in some circumstances where wars would not have arisen under competitive markets.