This article analyzes the effect of international migration on the wage gap between women and men who remain in Mexico. We use historical distance to the U.S. border over early twentieth-century railroad networks as an exogenous factor causing changes in the relative supply of men and women, due to predominately male migration. A 10% decrease in the relative labor supply of men tends to increase the wage gap between women and men by approximately 1.1 percentage points, suggesting that they are not perfect substitutes. However, the results imply a greater elasticity of substitution between men and women than that suggested by previous studies.