Why would governments agree to restrict their own discretion in setting domestic policies as part of a trade agreement? This paper examines the welfare consequences of the GATT's Agreement on Subsidies and Countervailing Measures (SCM). If countries which join a trade agreement are given free reign over the use of domestic production subsidies, then after negotiating tariff reductions, governments could undermine the agreement by introducing production subsidies to import-competing producers that effectively act as trade barriers. The SCM restricts the use of domestic subsidies by countries which have joined the WTO. Specifically, governments may not use sector-specific subsidies (agriculture is an exception) but they may subsidize their producers if they offer the same subsidy to all producers in their economies. I show that through an agreement like the SCM, governments can better achieve their goals of maximizing domestic welfare. This occurs because terms-of-trade concerns lead to subsidies in import- competing sectors that are higher than globally optimal and in export sectors that are lower than globally optimal. Therefore, a rule to require that subsidies be the same in all sectors forces a country to partially internalize these terms of trade externalities (by reducing subsidies to import-competing sectors and increasing subsidies to export sectors).