How can trade motivate environmental conservation? I develop a model that combines trade-specific investments (e.g., deforestation) with environmental externalities. Traditional trade agreements raise investments and thus deforestation. Nevertheless, a contingent trade agreement (CTA), where default tariffs can vary with changes in the production capacity (e.g., forest cover), can be designed so as to motivate conservation. The model permits many products, countries, and collaborators. A simple calibration suggests that growth and liberalization can cause Brazil’s agricultural area to expand by 27%, but this expansion can be avoided if the EU and the U.S. offer a CTA.