Part of the rationale for the North American Free Trade Agreement was that it would increase trade and foreign direct investment (FDI) flows, creating jobs and reducing migration to the United States. Since poor data on illegal migration to the United States make direct measurement difficult, data on migration within Mexico, where census data permit careful analysis, are used instead to evaluate the mechanism behind predictions on migration to the United States. Specifications are provided for migration within Mexico, incorporating measures of cost of living, amenities, and networks. Contrary to much of the literature, labor market variables enter very significantly and as predicted once possible credit constraint effects are controlled for. Greater exposure to FDI and trade deters outmigration, with the effects working partly through the labor market. Finally, some tentative inferences are presented about the impact of increased FDI on Mexico-U.S. migration. On average, a doubling of FDI inflows leads to a 1.5-2 percent drop in migration.