Public opinion about immigration is hard to understand. Americans express more favorable views toward immigration since Donald Trump was elected president.

But these poll numbers come with several caveats. First, the surge in support for immigration might simply be a reaction to the xenophobia of the Trump administration and could fade after he leaves office. Second, the polls say little about the salience of the issue to the two sides; opponents of immigration might be more motivated than advocates, and thus fight harder. Finally, it's worth noting that even now, those who support decreasing immigration outnumber those who back increasing it. And this data is just for the U.S.; other countries may be going in the opposite direction.

Why does the public seem to have an anti-immigration bias? The bulk of the data shows that immigrants, at least in the U.S., are a healthy and positive force. They are highly upwardly mobile. They make outsized contributions to technology and industry. They don't push down the wages of native-born workers and in the case of high-skilled immigrants they even raise them. They commit fewer crimes than native-born Americans. They pay plenty of taxes that help support local and state governments. They revitalize dying small towns and blighted neighborhoods. Why are so many Americans wary of what seems on paper like an unadulterated good?

One possible reason is that Americans, though more positive toward diversity than those in many other countries, also worry that their culture will be diluted by newcomers. Racial prejudice toward immigrants from nonwhite countries plays a role as well. And politics may also be a factor; because children of immigrants tend to vote for the Democrats, Republicans may fear that immigration poses a threat to their electoral strength.

But on top of all this, anti-immigration sentiment may be intertwined with suspicion of the welfare state. People may overestimate the amount of public resources spent on immigrants. And they may be less willing to distribute government benefits to people from other countries.

That's the upshot of a recent paper by economists Alberto Alesina, Armando Miano and Stefanie Stantcheva. The authors conducted detailed surveys with 24,000 native-born people in six developed Western countries — the U.S., the U.K., France, Germany, Sweden and Italy. What they discovered is a pervasive tangle of misperceptions.

First, native-born people in all the countries surveyed tend to substantially overestimate the number of immigrants. Across the entire demographic and political spectrum, people said that the share of immigrants in their countries was about 10 to 15 percentage points higher than it actually was. They also tended to make mistakes about the people coming in, overestimating the share of Muslim immigrants and underestimating the share of Christian ones (except in France). And they tended to underestimate immigrants' share of the highly educated workforce. The researchers also found that people tended to assume that immigrants receive more welfare benefits than the native-born.

So many people in rich countries seem to think of immigration much the way it's depicted on the famous poem on the Statue of Liberty — a tired, hungry, poor huddled mass. Even those who normally support the welfare state might be inclined to curb benefits if their country was faced with such a teeming horde of needy newcomers. That inclination will be even stronger among those who don't like the idea of the welfare state in the first place, who blame the poor for their poverty, who simply don't care about foreigners, or who buy into racist stereotypes. In a follow-up paper, Alesina and Stancheva show mathematically how all of these factors combine to reduce support for welfare.

Sure enough, Alesina and his colleagues found that when they ask people questions about immigration before asking them about redistribution (rather than afterward), their support for the welfare state goes down. Unsurprisingly, the effect is stronger among conservatives.

So immigration seems likely to reduce support for redistribution. But advanced countries all have big welfare states and are unlikely to abandon them up any time soon. Instead, it seems likely that many will try to shut the gates to foreigners instead.

Those who know the benefits of immigration will have trouble formulating a response. Information campaigns telling people that immigrants are a net fiscal positive seem unlikely to work (the Alesina study, for example, found that respondents weren't very interested in learning actual facts after the survey was over). Campaigning against racism and negative stereotypes of the undeserving poor may help, but changing deep-seated attitudes is always an uphill battle.

One approach might be to admit more skilled immigrants. Studies show that educated immigrants contribute much more in tax revenue than they take out; most people instinctively know that engineers or doctors are not likely to claim welfare benefits.

Tilting the immigration system toward skilled workers, as Canada and other countries do, won't just help keep government coffers flush — it might help preserve broad support for both immigration and the welfare state, even in the face of stubborn public misperceptions.

Noah Smith is a Bloomberg Opinion columnist. He was an assistant professor of finance at Stony Brook University, and he blogs at Noahpinion.

Star Tribune opinion editor's note: Michael Bloomberg, owner of Bloomberg News and Bloomberg Opinion, has entered the campaign for the Democratic presidential nomination. Star Tribune Opinion has long included articles from these sources among its wire-service selections and will continue to do so, judging them on their merits in comparison with other articles available at the time of publication. A note from Bloomberg Opinion about its practices during the campaign is here.