Biotic elements such as pests create biodiversity effects that increase production risks and impede land productivity when agriculture becomes more specialized. We show in a Ricardian two-country trade setup that production specialization is incomplete under free trade because of the decrease in land productivity. Pesticides allow farmers to reduce these effects, but they are damaging for the environment and for human health. When regulating farming practices under free trade, governments face a trade-off: they are induced to restrict pesticides use compared to autarky because national food consumption depends less on them, but they also want to preserve the competitiveness of their agricultural sector on international markets. We show that at the symmetric equilibrium under free trade, restrictions on pesticides are generally more stringent than under autarky. As a result, trade increases the price volatility of crops produced by both countries, and of some or all of the crops that are country-specific depending of the intensity of the biodiversity effects.