This study focuses on the problem of hedging longer-term commodity positions, which often arises when the maturity of actively traded futures contracts on this commodity is limited to a few months. In this case, using a rollover strategy results in a high residual risk, which is related to the uncertain futures basis. We use a one-factor term structure model of futures convenience yields in order to construct a hedging strategy that minimizes both spot-price risk and rollover risk by using futures of two different maturities. The model is tested using three commodity futures: crude oil, orange juice, and lumber. In the out-of-sample test, the residual variance of the 24-month combined spot-futures positions is reduced by, respectively, 77%, 47%, and 84% compared to the variance of a naïve hedging portfolio. Even after accounting for the higher trading volume necessary to maintain a two-contract hedge portfolio, this risk reduction outweighs the extra trading costs for the investor with an average risk aversion.