Immigration is an important topic in the United States, with a new poll showing that most Americans are open to foreigners.

“The belief that openness to people from around the world is essential is widely shared across most demographic groups,” the Pew Research Center said in an online post. “However, Democrats and younger people are considerably more likely than others to hold this view,” according to Pew, which said more than 2,500 people were polled for the national survey, conducted between June 27 and July 9.

Nearly one-third of Americans polled, however, said, “If America is too open to people from around the world, we risk losing our identity as a nation.”

Eighty-four percent of Democrats and Democratic-leaning respondents said, “Openness is essential to who we are as a nation.” That compares to 47 percent among Republican and Republican-leaning respondents.

Conservative Republicans were more concerned with openness than their more moderate counterparts, with slightly more than half  saying openness is a threat to the national identity. Among more moderate and liberal Republicans, the figure stood at 41 percent.

About 90 percent of liberal Democrats called openness to people from other countries essential to who Americans are as a nation. Among conservative and moderate Democrats, the figure stood at close to 80 percent.

Openness to foreigners was more common among younger Americans, with just over 80 percent of adults under 30 saying it is essential. For those aged 50 and older, about 60 percent said they felt that way.

The difference in opinion among whites, blacks and Hispanics was only modestly different at 66 percent, 74 percent and 72 percent, respectively.

There was only a modest difference in opinion among education levels. Just over 80 percent of people with a postgraduate degree said openness is essential, compared to 74 percent with a college degree and 64 percent among those without a four-year degree.

While there is widespread support for openness, the numbers begin to change when Americans are asked about illegal immigration.

According to a March survey by Gallup, about 3 out of 5 Americans worry “a great deal” or “a fair amount” about illegal immigration, a number it says has been fairly steady for 17 years since it has been asking the question. Gallup says there was a noticeable increase in worry about illegal immigrants from 2006 to 2011, when nearly two-thirds of those surveyed said they had worries.

Hispanic-Americans, according to Gallup, had the highest level of worry, with 67 percent saying they worry a great deal or a fair amount about the subject. That compared to almost 60 percent for both whites and blacks.

“Hispanics’ slightly greater concern about illegal immigration does not appear to be motivated by politics because Hispanics are a Democratic-leaning group politically,” Gallup said. “Whereas Republicans’ heightened concern with illegal immigration appears to focus on limiting it, Hispanics’ greater concern may reflect worries about the treatment of immigrants who are illegally in the U.S.”

Gallup also noted that Hispanics tend to favor policies that help illegal immigrants.

“Hispanics may be growing more concerned in reaction to the increased focus on dealing with immigrants in the country illegally, which could affect themselves, their family members or their neighbors,” Gallup said.

According to Pew, about 11 million unauthorized immigrants were living in the U.S. in 2015, a large percentage of whom are Hispanic; however, the percentage is dropping, compared to other groups.