(Bloomberg) -- Across much of Europe, the far right has sought to gain popularity by toning down its rougher edges. But Finland’s nationalists just jettisoned that playbook and were rewarded by voters for their extremism.

The anti-immigrant, euro-skeptic Finns Party came second in Sunday’s election, and is set to enter parliament with just one seat less than the victors, the Social Democrats. It was the closest election result in six decades, with the outcome representing a shocking upset over the center-right National Coalition party. The Center Party of Prime Minister Juha Sipila suffered a stinging defeat, coming in fourth.

For the Finns Party, the seeds of its gains were planted in 2017, when convicted Islamophobe Jussi Halla-aho took over the leadership and its more moderate members left. Until then the party had been part of Sipila’s center-right coalition. But after Halla-aho stepped in, the Finns Party was kicked out of government.

Halla-aho’s party has called for a complete stop to what it calls “harmful immigration,” and has embarked on a campaign to get “Finland back.” Those explicit anti-immigration policies helped lure voters.

“The party showed its true colors,” said Laura Nordstrom, a researcher at the University of Helsinki, who’s also a member of the Greens.

The Finns Party also stands out for its treatment of the issue of climate change. Its campaign vilified what it characterized as the liberal elite’s obsession with global warming, and promised voters not to prioritize environmental policies.

With the anti-green agenda, the Finns Party put its finger on the pulse of rural voters who travel long distances or do industrial jobs. Halla-aho argues that Finland shouldn’t damage its industry by trying to reduce emissions more than other countries.

As a counterpoint, the Green party posted a record result, suggesting that Finnish voters are deeply divided on both immigration and climate.

Halla-aho has deep roots within anti-immigrant movement. The 47-year-old was catapulted to fame a decade ago thanks to his blog “Scripta - Writings From a Sinking West,” where he railed at multiculturalism. The soft-spoken academic has been fined for calling Islam a religion of theft and pedophilia.

Finnish opposition to immigration shot up in the wake of the 2015 refugee crisis, when the number of asylum seekers, mostly from Iraq, jumped almost nine-fold. Resentment at foreigners was stoked again this year following reports that several refugees had been arrested after being accused of sexually abusing children. But just 7 percent of people living in Finland were born outside the country, compared with about 20 percent in neighboring Sweden, which is also dealing with a surge in right-wing populism.

Finland’s mainstream parties haven’t hidden their distaste for Halla-aho’s party, whose members have been seen marching with a neo-nazi group that has since been banned. That distaste means the Finns Party is unlikely to join the next government. But it won’t be ostracized.

Social Democratic leader Antti Rinne on Monday played down the success of the Finns Party in the election, and said the development is not a “particularly Finnish phenomenon.” He said the best antidote is to “focus on fairness” and to make sure “everyone living in Finland feels safe and confident in their future,” he said. “When we manage to do that, then these fears subside.”

Rinne said he’d treat the Finns Party the same as the others. But he also said it’s not “at all” clear that the party is even interested in being in government.

“I don’t see other parties going to them hat-in-hand right off the bat,” Nordstrom said. “Various coalitions are possible, which means they don’t need to necessarily be taken to government.”

Halla-aho told newspaper Helsingin Sanomat that his party now needs to set its red lines and said it was a mistake in the previous election to take a flexible approach. His track record suggests he’s not keen to work with the Social Democrats. In 2006, he referred to Social Democrats across the Nordic region as “the lowliest worms in the universe.”

To contact the reporter on this story: Kati Pohjanpalo in Helsinki at kpohjanpalo@bloomberg.net

To contact the editors responsible for this story: Tasneem Hanfi Brögger at tbrogger@bloomberg.net, Jonas Bergman

©2019 Bloomberg L.P.