SOCIAL DEMOCRATS in much of Europe are living through torrid times. In France and the Netherlands, once-mighty centre-left parties have been reduced to bit players; in Italy and Germany they have been pushed into third place behind populists or Greens. There are many reasons for their decline, but one is the politics of immigration: centre-left parties are seen as too permissive by many of their traditional working-class voters, who have switched to supporting anti-immigrant populist parties.

So the victory by Denmark’s Social Democrats (SD) in an election on June 5th is an important test case. After losing power in 2015, the SD got tough on immigration and integration. It sought to take back the initiative from the Danish People’s Party (DPP), an anti-immigrant populist outfit that has captured an increasing share of the working-class vote over the past two decades. The DPP has dragged the country’s immigration policy far in its own direction: the centre-right government of Lars Lokke Rasmussen, which has governed since 2015 through a confidence-and-supply deal with the DPP, has slowed the arrival of asylum-seekers to a trickle with tough policies such as mandating that their valuables be confiscated to pay for the costs of housing them.

The SD, under its leader, Mette Frederiksen, wants to go further in some ways. It has proposed an annual cap on “non-Western” immigration, and it wants to encourage foreign retirees to leave Denmark by letting them keep their state pensions. Ms Frederiksen and other SD politicians speak of the problem of immigrants forming “parallel societies” in Denmark, and of the need to eliminate immigrant “ghettos”. Whereas the party was once seen as relatively liberal on immigration, it has by now shifted its image to a group sceptical of newcomers, which insists that those in the country integrate into the dominant culture. If the SD’s strategy succeeded, many analysts thought, Europe’s other centre-left European parties might have a model to emulate.

When the result of the election came in, though, it was inconclusive. As polls predicted, the SD came first. It appears likely to return to government (pending coalition negotiations, which will start this week). But its share of the vote was 26%, down a bit from 26.3% in 2015. In contrast, the share of Venstre, Mr Rasmussen’s centre-right liberal party, rose from 19.5% to 23%. If Ms Frederiksen becomes prime minister, she will owe it to the strong performance of other parties on the left, which did not embrace tougher migration policies.

The DPP was indeed devastated. It lost more than half its vote share, falling from 21% to 8%. But just 12% of its previous voters shifted to SD, according to exit polls; more went to Venstre (17%). If SD’s strategy was to win back voters from the far right, it did not seem to have worked.

The equivocal results touched off a fierce debate in other countries with struggling centre-left parties, such as the Netherlands, where the Labour party’s share fell from 25% in the 2012 election to just 6% in 2017. Some analysts saw the SD’s win as proof that tough immigration policies work. “If the Dutch social democrats want to win back their original support base, they have to take on immigration,” wrote Kemal Rijken, a left-leaning political scientist, two days after the election.

Others pointed to the SD’s failure to raise its vote as evidence that the centre-left cannot hope to win such voters back. Tarik Abou-Chadi, a political scientist at the University of Zurich, argued that the paucity of DPP supporters switching to SD made it clear that even under “favourable circumstances” as in Denmark, anti-immigration politics could not be the future for social-democratic parties in countries like Germany.

Some in Denmark, however, said foreign interpreters were drawing the wrong conclusions because they misunderstood the strategy. The SD failed to increase its own vote share because it lost more voters to other leftist parties than it gained from the DPP. The Socialist People’s Party (SF), a green outfit, raised its share from 4.2% to 7%, while the left-liberal Radical Liberals (RV) went from 4.6% to 8%. This, however, was part of the plan: win voters from the right, even at the cost of losing some to the left, and you have shifted the overall centre of gravity, allowing a left-leaning coalition to seize power. The point was not to win the debate on immigration, but to neutralise it.

“By placing themselves where they did on immigration and integration, the SD took away a weapon from the liberals and conservatives. It took the heat out of the debate,” says Karina Kosiara-Pedersen, a political scientist. Because voters expected a tough immigration policy from whoever won the election, the contest refocused on other issues: first climate change, followed by education. Those are issues on which Danes currently trust the left more than the right. Meanwhile, the DPP was hurt by the entry of two new parties even farther to the right on immigration: the New Right party, which won 2%, and Stram Kurs (“Hard Line”), an extremist populist party that took just enough votes to damage the DPP but not enough to get into parliament.

The question is whether the SD’s strategy can be imitated by Europe’s other centre-left parties. Ms Frederiksen thinks it may be specific to Denmark. Depoliticising immigration by adopting tougher positions may work in countries—such as Sweden, Norway and Finland—with strong social-democratic parties that command loyalty on other issues. But in Germany, France, Italy and the Netherlands, voters have lost confidence in social-democratic parties for a wide range of reasons, especially economic ones. They are seen as complicit in labour-market reforms which left-wing voters dislike, and share the blame for austerity measures enacted during the euro crisis. That said, in Spain and Portugal, which have also undergone wrenching economic adjustments, the centre-left is doing well without adopting an anti-immigrant line.

The Danish results may thus hold lessons mainly for the rest of the Nordic countries. But elsewhere in Europe, social-democratic parties have problems which an anti-immigrant turn seems unlikely to solve.