Much of the debate over whether or not developing countries gain from regional trade agreements (RTA's) has focused on two characteristics that are common to developing countries: their relatively high tariffs and their high trade dependencies on one or a few developed trade partners. In this paper, we address a third common characteristic: their use of distorting domestic policies that are closely linked to trade restrictions. We argue that participation in an RTA can create pressures for domestic policy reforms. We analyze the case of a small country, Mexico, forming an RTA with two larger countries, the U.S. and Canada, in the North American Free Trade Agreement (NAFTA). Mexico exhibits all three characteristics of a developing country: relatively high tariffs, a high trade dependency on the U.S., and an extensive and pervasive system of farm support that was linked to the restriction of trade. For the analysis, we use a 26- sector, multi-country, computable general equilibrium (CGE) model in which the three single- country models are linked through trade flows, and farm programs are modeled in detail. We find that there are welfare gains from trade liberalization in all three countries only when domestic reforms are in place. Mexico gains from NAFTA only when it also removes domestic distortions in agriculture. Then, agriculture can generate allocative efficiency gains that are large enough to offset the terms of trade losses which arise because Mexico has higher initial tariffs than other RTA members.