The closing of the United States to immigrants is arguably the most economically and socially significant policy shift in American history. The U.S. had virtually open borders until 1879, when the first of a series of federal laws prohibiting or limiting immigration of particular groups was passed. By 1924, immigration had been reduced to a small fraction of the peak in the 1890s. During this time frame, 42 major votes were considered in the House and 31 in the Senate to limit immigration. Using data from the U.S. Congressional record, I explain the policy shift in public choice terms: identifying voting patterns that can be explained by shifts in public and elite opinion, the incentives of policymakers, and changing economic conditions. Explanations of the policy shift from previous scholarship are evaluated in light of roll-call voting data and NOMINATE scores. Using multivariate analysis, I find that Congressional ideology was an important factor in the development of immigration restriction policy, with the most restrictive legislation passed when legislators from the rural South joined a Congressional coalition against immigration.