Pests create biodiversity effects that increase food production risks and decrease productivity when agricultural production is specialized. Pesticides contain these effects, but damage the environment and human health. When opening to trade, governments are tempted to restrict pesticide use because, with more food being imported, less pesticide is needed for domestic consumption. However, pesticide restrictions hinder the competitiveness of their agricultural sector on international markets. We show that restrictions on pesticides are more stringent under free trade than under autarky, which reduces the gains from trade, and that trade increases food price volatility.