We develop a stochastic model of electoral competition in order to study the economic and political determinants of trade policy. We model a small open economy with two tradable goods, each of which is produced using a sector-specific factor (e.g., land and capital) and another factor that is mobile between these tradable sectors (labor); one nontradable good, which is also produced using a specific factor (skilled labor), and an elected government with the mandate to tax trade flows. The tax revenue is used to provide local public goods that increase the economic agents’ utility. We use this general equilibrium model to explicitly derive the ideal policies of the different socioeconomic groups in society (landlords, industrialists, labor, and skilled workers). We then use those ideal policies to model the individual probabilistic voting behavior of the members of each of these socioeconomic groups. We use this model to shed light on how differences in the comparative advantages of countries explain trade policy divergence between countries as well as trade policy instability within countries. We regard trade policy instability to mean that, in equilibrium, political parties diverge in terms of the political platforms they adopt. We show that in natural resource (land)–abundant economies with very little capital, or in economies that specializes in the production of manufactures, parties tend to converge to the same policy platform, and trade policy is likely to be stable and relatively close to free trade. In contrast, in a natural resource–abundant economy with an important domestic industry that competes with the imports, parties tend to diverge, and trade policy is likely to be more protectionist and unstable.