An old country inn in the southern Swedish town of Karlshamn now shelters refugee families. Children play in the lobby, while a few adults watch news on a large-screen TV. More than 100 volunteers from the community want to help the refugees.

But the newcomers' arrival also has brought out ugly sentiments on social media, says Magnus Arvidsson, who is coordinating the volunteers. He says some people were saying on Facebook, "Oh my God, there [are] a lot of refugees coming to our village and we have to lock our bikes. And hide our stuff. We can't let our children out."

For decades, Sweden has served as a haven for those fleeing war and persecution the world over. But the country's traditionally liberal acceptance of refugees is now being questioned. Some 160,000 asylum seekers arrived in the country last year alone, stretching its resources. Sweden's idealistic culture is starting to show cracks.

A nationalist, anti-immigrant party, the Sweden Democrats, is steadily gaining support. The party was long seen as marginal, but today it holds 14 percent of seats in the national legislature.

The party claims migrants are taking social benefits in a social welfare system that Swedes have worked hard to build. The party says there is not enough to go around. And it says migrants don't make an effort to integrate.

Kent Ekeroth holds one of the Sweden Democrats' seats in the parliament. He says Sweden's political elites have forced too much immigration onto the Swedish people.

"They've been in cahoots, so to speak, for decades, trying to increase immigration, trying to argue for immigration, trying to diminish the negative effects of immigration and always paint it in a nice, rosy glow," he says. "All of them — the Social Democrats, the moderates, the Christian Democrats, the Green Party."

All those parties are refusing to work with the Sweden Democrats. But Ekeroth says some of Sweden's more conservative parties are starting to change their attitudes toward immigration, for example by favoring limits on benefits to migrants.

He claims his party actually has a lot more support than polls show, because Swedes are reluctant to publicly admit their support for the Sweden Democrats.

There's a phenomenon in Swedish culture called åsiktskorridor, literally "opinion corridor," which people describe as a system of self-censorship that limits what is and is not acceptable to say.

"I think there's a fear of appearing intolerant in Sweden and that's part of the political culture, whether it's for good or for bad," says Joakim Palme, a professor at Uppsala University.

Students Anna Svensson and Suri Lundgren say they and their friends welcome the refugees and are glad that Sweden is able to help them. But they admit it is difficult for people who don't agree with them to speak out.

"We don't like to get into arguments and stuff," says Svensson, "and I think people are afraid of being seen as racist."

Ivar Arpi, an editorial writer for the Svenska Dagbladet newspaper, says he's never seen his country so polarized. Swedes are worried their leaders don't have a plan to deal with the effects of mass immigration, he says.

"The ground is shaking, I would say. What's happening now is that we are challenged in the core of our identity," he says. "There [are] two Swedens right now. There's the human rights, open borders, internationalist Sweden — the one that's held power for so long. And then there's the more constrained version of Sweden, like [favoring] welfare state for citizens first and foremost, and our resources are limited."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.