MALMO, Sweden (AP) — With election day in Sweden approaching, Joakim Sandell, the leader of the Social Democratic Party in the city of Malmo, pulled on a jacket with his party’s rose emblem and headed out to ring doorbells and urge people to vote.

Many people in the Mollevangen district, an ethnically diverse neighborhood with roots in the labor movement, support Prime Minister Magdalena Andersson’s Social Democrats. But Sunday’s election is expected to be very close and the center-left party is fighting for every last vote as it faces a strong challenge from the right.

Sandell, who is running for reelection to the national parliament, the 349-seat Riksdag, began his campaign thinking voters would want to discuss health care after the COVID-19 pandemic, which took a heavy toll among the elderly. He also expected them to bring up NATO, after the historically non-aligned Scandinavian nation — which hasn’t fought a war since the Napoleonic era — decided to join the alliance after Russia’s invasion of Ukraine in February.

But Swedish voters are mostly focused on rising energy costs in the wake of the war in Ukraine and violent crime at home.

Andersson, who became Sweden’s first female prime minister less than a year ago, enjoys high approval ratings. Her party is a defender of Sweden’s generous welfare state but its support has been declining for years.

“We lost many, many votes in the last 20 years. We’ve been struggling on our way down,” said Ines Pentmo, a 62-year-old nurse who was canvasing with Sandell this week in Malmo. She was welcomed in Sweden after fleeing Chile’s dictatorship with her family in the 1970s and doesn’t want Sweden to abandon its traditional openness to refugees.

“The threat is very strong from the right,” she said.

The Sweden Democrats, a right-wing populist party that takes a hard line against immigration and crime, is on the rise as other parties move closer to its approach. The prime minister herself campaigned on promises to increase the police force.

The Sweden Democratic party was founded by people from the neo-Nazi movement decades ago. They party has sought a more moderate course but many Swedes remain wary of that shift. When the party first won seats in parliament in 2010, other parties refused to work with them.

But polls now suggest that the party could get its best result yet with around 20% of the vote, which gives it a chance to overtake the Moderates, a traditional center-right party, to become the dominant party on the right.

If a right-wing bloc of four parties emerges ahead of the left-wing bloc of four parties, the Sweden Democrats would gain unprecedented power. Recent polls show the race as too close to predict.

The Sweden Democrats are “now considered a possible party to cooperate with when it comes to government formation. This was not the case in previous elections, but things have changed,” said Anders Sannerstedt, a political scientist at Lund University in southern Sweden.

The catalyst for this shift came in 2015, when large numbers of migrants and asylum-seekers from Syria and Afghanistan overwhelmed the county’s resources, Sannerstedt argued. The country of 10 million people took in a record 163,000 refugees that year.

The Sweden Democrats accuse Andersson and her left-wing allies of not doing enough to stop the shootings and explosions that have taken place largely in underprivileged neighborhoods that have many people from immigrant backgrounds who have not assimilated into Swedish society.

The violence has lately been spreading. In one high-profile case, a 15-year-old boy fatally shot a gang member inside an upscale shopping center in Malmo in August. A woman nearby was injured.

Mattias Sigfridsson, Malmo’s deputy police chief, said there’s actually been a decrease in violent crimes in recent years.

“But of course … when the crimes are very spectacular, when you shoot somebody in a shopping center in the middle of day” or when there are detonations, it creates feeling of insecurity for everyone, he said.

Even in the nearby town of Lund, a peaceful cobblestoned university town near Malmo, safety is a key concern. Victoria Tiblom of the Sweden Democrats in Lund, who was out meeting voters at a town square, was pleased that other parties are now speaking more openly about crime in immigrant neighborhoods, something long viewed as a taboo.

“You can only solve the problems in a no-go zone if you talk about them. And we feel like a lot of the other parties, they have just neglected the problems. Same thing with immigration,” she said. “So we have brought a lot of problems to the surface so we can talk about them and also solve them.”

Despite the Sweden Democrats’ attempts to clean up their image, party members sometimes still are accused of racism. One lawmaker recently tweeted a photo of a Stockholm metro train along with the message: “Welcome to the return train. You hold a one-way ticket. Next stop, Kabul!”

In a separate incident, a party employee sent an email encouraging people to celebrate the Nazi invasion of Poland 83 years ago on Sept. 1.

Karolin Lunden, a 40-year-old surgeon, said she always voted conservative. But as she visited the campaign stands in Lund with her 8-year-old daughter, she said she was voting for the left this year due to the willingness of other conservative parties to work with the Sweden Democrats.

“I don’t want them to have any influence,” she said.