We develop an equilibrium model of the term structure of forward prices for storable commodities. As a consequence of a nonnegativity constraint on inventory, the spot commodity has an embedded timing option that is absent in forward contracts. This option's value changes over time due to both endogenous inventory and exogenous transitory shocks to supply and demand. Our model makes predictions about volatilities of forward prices at different horizons and shows how conditional violations of the ‘Samuelson effect’ occur. We extend the model to incorporate a permanent second factor and calibrate the model to crude oil futures data.