A baby shortage sounds like an adorable misfortune of middling significance. Actually, it’s a critical problem. To expand their economies, countries need to expand their populations, particularly at a time of low productivity growth. Rich countries also need a larger and richer workforce to pay for government services to the sick, poor, and elderly. In the long term, with automation, these countries may run out of jobs. But in the short term, they are running out of people. In fact, the number of Americans between 25 and 54 years old has not grown in more than a decade.

That brings us to the second story: immigrants. As the birth rate has declined in the U.S., Canada, Western Europe, and Japan, the immigrant share of their populations has increased. This is a perfectly natural and good development. These countries have high median incomes, which are attractive to international migrants, plus their economies need new humans to sustain both GDP growth and government services.

This might sound counterintuitive to some people who’d assume that a large influx of low-skilled immigrants would be a huge drag on federal resources. In the short term, they might be. But as the children of immigrants find jobs and pay taxes, immigrant families wind up being a net contributor to the government over many decades, according to a 2016 report from the National Academy of Sciences. Beyond this economic accounting, there is a strong moral case to allow families from low-income countries move to a richer country, where they can improve their lot by an order of magnitude.

But there is a growing body of evidence that as rich majority-white countries admit more foreign-born people, far-right parties thrive by politicizing the perceived threat of the foreign-born to national culture. That concept will sound familiar to anybody who watched the 2016 U.S. presidential race, but it’s a truly global trend. A 2015 study of immigration and far-right attitudes in Austria found that the proximity of low and medium-skilled immigrants “causes Austrian voters to turn to the far right.” The effect was strongest in areas with higher unemployment, suggesting that culture and economics might reinforce each other in this equation. Last week, the far-right Austrian party triumphed in the nation’s election.

This is where the story finally connects with welfare and the future of liberalism. Rich countries tend to redistribute wealth from the rich few to the less-rich multitude. But when that multitude suddenly includes minorities who are seen as outsiders, the white majority can turn resentful and take back their egalitarian promises. Take, for example, the Twin Cities of Minnesota. They were once revered for their liberal local policies—like corporate-tax redistribution from rich areas to poor neighborhoods and low-income housing construction near business districts. But since the 1980s, as the metro area attracted more nonwhite immigrants, the metro has become deeply segregated by income and race and affordable-housing construction has backtracked. Or take Finland, that renowned “Santa Claus State” of cradle-to-grave social services, where the welfare state is being “systematically dismantled.” The far right has emerged in the last few decades, just as foreign-born population has suddenly grown.