We develop a dynamic model of the world economy that jointly endogenizes individual decisions about fertility, education and migration. We then use it to compare the short- and long-term effects of immigration restrictions on the world distribution of income. Our calibration strategy replicates the economic and demographic characteristics of the world, and allows us to proxy bilateral migration costs and visa costs for two classes of workers and for each pair of countries. In our benchmark simulations, the world average level of income per worker increases by 12% in the short term and by approximately 52% after one century. These results are highly robust to our identifying strategy and technological assumptions. Sizable differences are obtained when our baseline (pre-liberalization) trajectory involves a rapid income convergence between countries or when we adjust visa costs for a possible upward bias. Our quantitative analysis reveals that the effects of liberalizing migration on human capital accumulation and income are gradual and cumulative. Whatever is the size of the short-term gain, the long-run impact is 4 to 5 times greater (except under a rapid convergence in income).