The United States has seen an extraordinary influx of immigrants in recent decades. In 1970, the foreign-born were only 4.7 percent of the nation. Now, they make up 13.7 percent of the population.

We’ve been here once before. As this chart from the Census Bureau shows, the flow of newcomers over the past century resembles the letter U. Between 1840 and 1920, the nation experienced an even larger immigration surge. By the early 1900s, nearly 15 percent of U.S. residents had been born in a different country.

Then, as now, not everyone was pleased with the way the nation was changing. A growing nativist movement lobbied — often violently, and often in racist terms — for laws to close the borders. This xenophobic uproar culminated in the Emergency Quota Act of 1921, which capped the number of people that could arrive each year.

By the time the baby boomers were growing up, the immigrant presence in the United States was reaching its lowest ebb. But their children — especially today’s millennials — were born into a more welcoming climate. In 1965, spurred by the civil rights movement, Congress softened its racist restrictions on immigration, causing the foreign-born population to increase again.

The abrupt change in policy created a generational divide. Those who came of age in the 1990s were roughly three times more likely than their parents to encounter peers who were immigrants or the children of immigrants.

This may help explain why younger generations tend to be much more accepting of immigrants. The Public Religion Research Institute, for instance, finds that 68 percent of young adults say that immigrants strengthen American society, while only 42 percent of their elders agree.

With the foreign-born population projected to reach record levels in the coming years, immigration has again become a front-and-center political issue, just as it was over a century ago. But there are signs that this time is different.

Though Donald Trump has made anti-immigrant policies a cornerstone of his campaign, most of his stances don’t seem to resonate with younger voters. In fact, a new poll of 18- to 30-year-olds shows that millennials are rapidly becoming even more welcoming toward immigrants.

Just in the past three years, there have been startling shifts in how 18- to 30- year-olds feel about the foreign-born, according to a comparison of two identically worded polls from the Black Youth Project at the University of Chicago and the AP-NORC Center for Public Affairs Research.

“It's a really big increase,” said Jon Rogowski, an assistant professor of government at Harvard and co-author on the report. “Young adults are becoming substantially more supportive of progressive and comprehensive solutions to the immigration problem.”

The greatest changes have been among white non-Hispanic millennials, who now overwhelmingly support laws that would help immigrants stay in the country.

  • Between 2013 and 2016, their support for a path to citizenship for undocumented immigrants increased from 67 percent to 84 percent.
  • About 69 percent of them now say that undocumented citizens should get citizenship if they graduate from college, up from 53 percent in 2013.
  • And 71 percent want an expanded guest worker program, up from 60 percent three years ago.

The data also shows that white non-Hispanic millennials are also starting to view immigration itself in more positive ways.

  • 49 percent of them say that immigrants “take jobs, housing and health care from people born in the U.S.” — down from 59 percent in 2013.
  • Nearly 60 percent of them say that immigrants are changing the American way of life for the better, up from 44 percent in 2013.

On most of these issues, white millennials are catching up to black millennials, who were generally more accepting of immigrants both in 2013 and 2016. But even among young black adults, support for immigration increased on certain questions.

"The data suggests that the next majority coalition will be progressive whites and people of color," Rogowski says.

How is it that millennials seem to be changing their minds so quickly? There are two major explanations.

First, younger generations have grown up with more diversity, so they likely feel more comfortable with immigrants in general. This is a version of what psychologists call the contact hypothesis — the idea that people become less prejudiced when they spend more time with other groups.

“Young people in the United States, in many places, are just growing up in fundamentally more diverse localities,” says Irene Bloemraad, a sociologist at the University of California at Berkeley. “If you're going to school with people who have immigrant parents, if they seem like good kids and they’re you're friends, then worries about immigrants taking jobs are maybe less salient.”

“That doesn’t mean it’s all sunshine and roses in schools — it’s obviously not,” she continued. “But it’s a different experience for younger people than for people in prior generations.”

On the other hand, Bloemraad says, demographic changes are not all that swift; and many children still live in segregated neighborhoods. So the contact hypothesis might not fully explain why young people have shifted their views on immigration in the last three years.

Another theory is that the current presidential campaign could have affected how young people answered the survey, which was most recently administered in August. Donald Trump has been widely accused of racism for his comments describing Mexican immigrants as "rapists" and his calls to ban Muslims from entering the United States. His inflammatory rhetoric may have caused some millennials to distance themselves from him and his views on immigration.

“When politicians are vocal on an issue, it can trigger people to think about their own positions, and maybe reconsider them,” said Claudia Sandoval, a political scientist at Loyola Marymount University who studies perceptions of immigrants. “I think hearing all of the xenophobia has caused people to question what they themselves thought about immigrants in the past.”

"This may be one of the positive things that come out of Trump being so critical of immigrants," she said.

So far, Donald Trump has made two kinds of arguments against immigration. He has described immigrants as criminal and economic threats; and he has railed against the undocumented as an offense to law and order, calling for mass deportations and increased border security.

On that latter point, Trump seems to have more support among young adults. Nearly 90 percent of white millennials and three-quarters of black millennials want employers to screen and reject undocumented immigrants. Two-thirds of white millennials want more border enforcement; 51 percent still support deporting all immigrants “living in this country illegally,” down from nearly 60 percent in 2013.

But at the same time, the data suggests that younger generations increasingly believe that immigrants are helping the nation, not harming it.

The United States is fast approaching levels of immigration that it hasn’t seen in over a century. The last time the percentage of foreign-born residents was this high, in the early 1900s, people were making eerily similar objections. They complained that immigrants were stealing jobs, refusing to assimilate, and darkening the moral character of the nation.

Donald Trump has accused Mexico of sending "criminals" across the border. Over a century ago, when the nation faced a swell of immigrants from southern Europe, a Congressional joint task force concluded that "certain kinds of criminality are inherent in the Italian race."

Preston F. Hall, the secretary of the Immigration Restriction League, likened the immigrants to barbarians. “They are the defective and delinquent classes of Europe — the individuals who have not been able to keep the pace at home and have fallen into the lower strata of civilization,” he wrote in 1912.

Such arguments proved persuasive back then; but as these polls show, young people are much more accepting of diversity these days — and, perhaps, much more skeptical of anything that sounds like bigotry or racism.