Many commodities (including energy, agricultural products and metals) are sold both on spot markets and through long-term contracts which commit the parties to exchange the commodity in each of a number of spot market trading periods. This paper shows how the length of forward contracts affects the possibility of collusion in a repeated pricesetting game. We find that as the duration of contracts increases, collusion becomes harder to sustain. Nevertheless, firms with low discount factors that would not be able to sustain collusion without contracts, can always sustain some collusive prices above marginal cost, provided that they sell enough contracts. Hence long-term contracts have an ambiguous impact on collusion. Such ambiguity is due to the interaction of two effects, the gain-cutting effect, which reduces the immediate gain from defection, and the protection effect, which reduces the amount of punishment that deviators can receive.