A hard-line anti-immigrant party is poised for a big win in Sweden’s elections Sunday, seemingly signaling another dramatic shift toward the far right in Europe in a historic liberal bastion.

The Sweden Democrats say their rise is because nations like theirs have been overwhelmed by foreigners, particularly after more than 2 million flowed into Europe since 2015 in the biggest wave of refugees since World War II. But new research suggests that line might be as misleading as the stories the party’s supporters have pumped out on social media about immigrant behavior.

Instead, the party’s success is strongly associated with a factor foreigners had little control over: the policy choices of Sweden’s native politicians, according to a recently released paper by five economists that draws on data about Sweden Democrat candidates and voters.

The experts point to a double whammy. In 2006, a new center-right government took aim at Sweden’s famed welfare state, reducing unemployment, sickness and disability benefits to finance tax cuts, and sparking a sharp and sustained increase in income inequality. Come 2008, the global financial crisis hit, causing big job losses, particularly among people who had already become less secure in the labor market.

“People mostly look at the radical right from the angle of external shocks, like trade [with foreign workers proving cheaper than domestic ones] and globalization… the point that you might take away from our paper is the effect of austerity policy,” said Johanna Rickne, one of the co-authors of the report and a professor at Stockholm University.

The first election after the events the researchers focus on, held in 2010, marked the first time the Sweden Democrats scored enough votes to enter Sweden’s parliament. In the next election, they more than doubled their vote share.

What the party relied on, the researchers show, was the increasing pain of “outsiders” ― people, primarily working-class men with lower levels of education, who had little stable employment and relied heavily on government benefits. The Sweden Democrats also attracted particular “vulnerable insiders” whose jobs were especially likely to be outsourced or otherwise obliterated by the market, perhaps because of technological change.

Those groups of “relative economic losers” also provided a disproportionately high number of the party’s electoral candidates compared with Sweden’s other parties. The result was that the two groups became tightly tied to a foreigner-bashing party that had been around, but was not a major force, since 1988, after emerging from neo-Nazi circles.

“If you are yourself doing worse and worse, relative to others, and your income is stagnating or even declining year after year compared to people with stable employment… people are prone to thinking immigrants are taking resources rather than understanding tax and spending policy,” Rickne said.

Scanpix Sweden / Reuters Signs put up in 2015 by the Sweden Democrats in Stockholm accuse the government of not doing "what's needed" and note that the party is "growing at record speed."

In the years since, Sweden’s economy has become one of the fastest-growing in Europe. Swedes who are “insiders” have done better and better. But inequality has continued to flourish ― and so have the Sweden Democrats. The country’s top parties on the center-left and center-right have shown little interest in reconsidering the tax cuts package of 2006 or other steps toward expanded redistribution. Even the social spending promises of the main liberal party, the Social Democrats, focus on universal benefits rather than those targeted at, say, the “outsiders.”

That seeming callousness ― and the economic changes in the first place ― are the reason many voters became distrustful and were inspired to thumb their nose at the Swedish establishment. With that as a priority, those voters respected the Sweden Democrats’ determination to criticize politicians’ general consensus on welcoming immigrants, the paper argues, perceiving that as a way to tackle Sweden’s own elites as much as (or perhaps more than) foreigners. The often harsh and targeted rhetoric matters, then, but not just because of voters’ racial animus.

Voters have stuck with the party as it has focused on immigration restrictions, saying little about reversing the policies of the mid-2000s and instead adopting standard fiscally conservative talk about the value of tax cuts and arguing having fewer immigrants will preserve the welfare state. And the researchers found that those groups’ continued support for the Sweden Democrats does not seem linked to direct exposure to immigrants or demographic changes in their own communities.

Sound familiar? Other developed economies that are growing richer but also more unequal have seen similar developments. A different study released this year found links between politically imposed austerity in the United Kingdom and support for the immigrant-baiting party that promoted Brexit, the paper notes. In Finland, a radical right party has made gains after painful spending cuts even though the country has experienced minuscule amounts of immigration.

Factors other than economic anxiety remain central to the popularity and conduct of anti-immigrant parties like the Sweden Democrats.

“Our paper doesn’t provide 100 percent of the explanation,” Rickne said.

But it’s attracting attention in Sweden and abroad ― and has undeniable value in showing what rival politicians and others upset about the hard-right’s growth need to understand and address.

“I find their results interesting and intuitively reasonable,” Niklas Bolin of Mid Sweden University told HuffPost in an email, noting that the study departs from much other research directly tying increased anti-immigration views to increased support for the far right.

A central question that remains is whether voters like these support parties because they purport to be anti-establishment, by departing from elite views on immigration or other issues, or if economic insecurity directly makes people more likely to decide they are upset about foreigners.

“One plausible hypothesis is that those voters who are economically less well-off also [are] more receptive to anti-immigration messages,” Bolin wrote.

At least some clues likely lie in Sunday’s results and the aftermath: what the Sweden Democrats do with their newfound power and how their supporters react.