Campaigning on issues like immigration, religion, crime and the cost of environmental rules, the Sweden Democrats, a party with neo-Nazi roots, grew its support.STOCKHOLM — Magnus Karlsson, 43, works in information technology and is about to start his own company. Articulate and thoughtful, he follows the news carefully, both in Sweden and globally.But fed up with what he considers the complacency of the Swedish political establishment toward issues of immigration, crime and inflation, he voted last week for the Sweden Democrats for the first time.The party, which was founded in 1988 and has roots in the neo-Nazi movement, won 20.5 percent of the vote in Sunday’s election, giving it the second-highest number of seats in Parliament, after the center-left Social Democrats. It is the largest party in the right-leaning coalition that is expected to form the next government, gaining more votes than the more traditional center-right Moderates party, whose leader, Ulf Kristersson, is expected to become prime minister.Despite their showing, the Sweden Democrats will not take cabinet posts, in large part because another coalition partner, the smaller Liberal Party, rejected the possibility. But the Sweden Democrats and its leader, Jimmie Akesson, are expected to have a major influence over government policy. The party is stringently anti-immigrant and is also expected to demand changes in policing, criminal justice, social benefits and environmental regulations.From Mr. Karlsson’s point of view, immigration is the key issue. “We have been naïve as a country — that makes us Swedes, it’s in our DNA — and we think the best of people,” he said, referring to migrants and refugees. “But, if those people take advantage of us and our welcome, we might have to change our views.”Sweden, with a history of openness to political refugees, accepted more migrants and asylum seekers per capita than any country in Europe, including Germany, in the 2015 mass migration crisis, most of them from Muslim countries. But the center-left Social Democrats, who have governed for the last eight years, failed, in many eyes, to assimilate the newcomers, while the far right has made strides by tying the longstanding issue of gun crime to immigration.Flags strung across a road in Filipstad, Sweden. The community of 10,000 people was home to 2,000 refugees from a number of countries in 2019.Nora Lorek for The New York TimesOther European countries with similar levels of immigration have not experienced the same rise in gun violence, however, and researchers say more study is needed to determine whether there is any link.Nonetheless, Mr. Karlsson is adamant. “Swedish society is great and open, but it is eroding,” he said, citing “the gang violence, the shootings, the nonexistent integration policies and the open borders.”“We need a change,” he added, “and I think the Sweden Democrats are more aligned with my points of view.”In Staffanstorp, a suburb of Malmo, where the crime rate is higher than in any other Swedish city, Maria Celander, a 42-year-old podiatrist, also voted for the Sweden Democrats.“We have taken in too many refugees, and it’s turned things upside down here,” she said. “We can’t afford to take care of everyone.”She denied any bias against immigrants. “It’s not that we are racists, those of us who have voted for them,” she said. “We’re regular people who want law and order. I want a safer country.”She said she believed that the Sweden Democrats would push for lower energy prices and less restrictive environmental controls. “We have a good approach to the environment here, but it won’t help if we stop driving cars or cut down on things if they’re not doing it on the other side of the planet,” she said.Police officers patrolling Rinkeby Square in Stockholm in June. Gun violence was a top political issue in this year’s election.Ilvy Njiokiktjien for The New York TimesBut both Mr. Karlsson and Ms. Celander fear that the party will fail to get new policies implemented, falling into what they consider the usual pattern of coalition governments that produce bland compromise and little change. And both would prefer if the party were actually in the government, with ministerial jobs, rather than just trying to influence it.“I hope they want to stand for what they say they stand for,” Ms. Celander said. “You can’t go out and tell everyone that you’re going to do this and this, and not help to govern.”Mr. Karlsson, too, who in 2018 voted for the Moderates, wants the Sweden Democrats “to walk the walk.” He understands the coalition complications but, he said, “We have to let them into government and see what they can do — either they can manage it or they’re just another bunch of people getting together to complain about things.”Christian Sonesson knows something of what giving the Sweden Democrats a share of power might mean. He is a Moderate and has been mayor of Staffanstorp since 2012. In 2018, he created a local coalition with the far-right party, having decided that their policies on taxation, governance, school, crime and the economy were close to his own. It created a fuss in the national party, but the coalition has worked well on the local level, he said.“I noticed that these people were not the monsters the media presented them as,” he said. “They were very close to us,” he added: “Keep taxation as low as possible. Don’t let gangs get a grip.” The local coalition installed surveillance cameras and hired security guards; the result was a significant reduction in violence and disturbances, Mr. Sonesson noted, adding that citizens’ sense of safety had gone up.Also noteworthy, he said, was that local support for the Sweden Democrats had dropped a bit, while votes for his Moderates had increased.“People don’t like it when they see a party at 20 to 30 percent that has no power,” he said. “That’s unfair in people’s minds.”Pictures of confiscated guns at a police station in the Rinkeby neighborhood of Stockholm in June.Ilvy Njiokiktjien for The New York TimesLeaving the Sweden Democrats out in the cold, he suggested, would help the party grow. “They become so big that they can govern by themselves,” he said. “But if you take them in as a coalition partner and they are forced to take responsibility, then they grow or drop in popularity based on their own actions,” he said.Many worry about normalizing what has been such an extreme party, one that has played cards of fear and racism — especially through its online magazine, Samtiden, and the YouTube channel it controls. The Sweden Democrats support closing the country’s borders entirely, have urged the banning of halal meat in schools and have criticized the previous center-left government for being soft on migrants, crime and Islamist extremists.Mr. Akesson, the Sweden Democrats leader, has said in the past that Muslim migration to Sweden is “our biggest foreign threat since the Second World War.”But there is also a growing belief that ostracizing the party simply lets it play the role of critic without responsibility.Anders Falk, 64, a manager in a construction company, sees danger in the Sweden Democrats influencing from behind and would prefer them to take responsibility in government. He cited the experiences in Denmark, Finland and Norway, where far-right populist parties either moderated in government or failed and lost support.The Social Democrats, he said, deserved to lose, because “integration didn’t work,” while there seemed to be “a taboo” among established politicians about discussing problems such as crime and unemployment. “I think the rest of Europe is laughing at us,” he said, referring to the fallout from the migrant crisis, adding that other countries “were much more restrictive about immigrants, and we took full responsibility.”Counting ballots in Stockholm last week.Jonathan Nackstrand/Agence France-Presse — Getty ImagesErik Andersson, 25, works in television and film. He said he was frustrated with the difficulty of getting real change from coalition governments. Although he disagrees with and did not vote for the Sweden Democrats, they should be allowed to rule — and fail, he said.“People will realize that they can’t do anything,” he said, “and they will fall off a cliff.”But there is a lesson for Sweden in their rise, Mr. Andersson added. The Sweden Democrats “spoke about things that should be looked into, but because of the taboos, no one wanted to discuss them.” Now, he said, the results can be seen.“You need to be able to talk about problems openly, because if you don’t, extremism will grow,” he noted. “You have to be able to talk openly and challenge the extremists.”Steven Erlanger More