We model oil price dynamics in a general equilibrium production economy with two goods: a consumption good and oil. Production of the consumption good requires drawing from oil reserves at a fixed rate. Investment necessary to replenish oil reserves is costly and irreversible. We solve for the optimal consumption, production and oil reserves policy for a representative agent. We analyze the equilibrium price of oil, as well as the term structure of oil futures prices. Because investment in oil reserves is irreversible and costly, the optimal investment in new oil reserves is periodic and lumpy. Investment occurs when the crude oil is relatively scarce in the economy. This generates an equilibrium oil price process that has distinct behavior across two regions (characterized by the abundance/scarcity of oil). We undertake three empirical tests suggested by our model. First, we estimate key parameters using SMM to match moments of oil price futures as well as other macroeconomic properties of the data. Second, we estimate an affine regime switching model of the oil price, which captures the main features of our equilibrium model and preserves the tractability of reduced-form models. Lastly, we compare the risk premium in short-maturity oil futures implied by our model to the data.