This paper explores the relationship between economic openness and income per person using cross-country data. To address endogeneity concerns we extend the instrumental-variables strategy first used by Frankel and Romer (1999). First, we show that bilateral geographic characteristics of countries such as distance, contiguity and commonality of language are successful in predicting openness to immigration and to trade. Equipped with these instruments we then establish a robust, positive effect of openness to immigration on long-run income per capita across countries using econometric specifications that include a comprehensive set of variables controlling for geography, climate, disease environment, and colonial past. In contrast the positive effect of trade openness on income vanishes once the control variables are included in the specification. Our main finding is robust to explicitly including institutional quality as an (endogenous) regressor, controlling for measures of early economic development, and measuring the share of immigrants in terms of efficiency units of labor. We also show that the main effect of migration operates through total factor productivity but not through institutional quality. This is consistent with the idea that immigration increases the variety of skills and ideas available for production. We also provide some more direct evidence of this channel by building an index of the degree of diversity in immigration flows by country of origin. Immigration also increases linguistic fractionalization which, in turn, has a negative effect on income per capita, however the direct gains from greater skill diversity are much larger than the costs arising from increased fractionalization due to immigrants. We do not find evidence of increased income inequality due to openness to immigration or trade. Finally we find evidence that immigration benefits the amount of innovation produced in a country as measured by patents.