Sweden Democrats leader Jimmie Akesson speaks at an election party in Stockholm on Sunday. (Anders Wiklund/EPA-EFE/Shutterstock)

EUROPEAN LIBERALS breathed a sigh of relief when the results of Sweden’s general election emerged on Sunday, and with some reason. The far-right Sweden Democrats, which many feared might finish first in the balloting, instead came in third with 17.6 percent of the vote, only a modest improvement over the 12.9 percent it collected four years ago. That suggested that the political damage from the mass wave of refugees that swept into Europe in 2015 had been contained: Though Sweden absorbed more Syrians, Iraqis, Afghans and other migrants per capita than any other country — 163,000 in a nation of 10 million — more than four-fifths of the electorate rejected the nationalist and xenophobic alternative.

The election results nevertheless left Stockholm in a political mess on Monday morning, and the centrist establishment badly weakened. Neither the traditional center-left nor center-right coalitions captured a majority; both collected about 40 percent of the vote. Since the centrists have pledged not to bargain with the far right, the formation of a government will be difficult. The non-extremist vote is badly fragmented: The ruling Social Democrats, who have traditionally dominated Swedish politics, saw their vote share drop to their worst showing in a century, 28 percent, compared with 45 percent during the mid-1990s.

For better or for worse, Sweden has become “part of the new normal of European politics,” as former prime minister Carl Bildt put it. Though extremists of the far left or right have not seized power, they are positioned to grow stronger if traditional parties continue to falter. That’s also the case in Germany, France, Spain and the Netherlands; in Italy and Austria, anti-immigrant extremists have already gained a share of power. In Poland and Hungary, they rule with an autocratic fervor.

The liberals long ago capitulated on immigration: After 2015, the flow of refugees from the Middle East and Africa to Europe was choked off. Only 23,000 have arrived in Sweden this year, a low number for a country traditionally generous to migrants. The newcomers have not stolen jobs from citizens: Unemployment among native Swedes is 4.4 percent. As elsewhere in Europe, however, integration of the new population has been a challenge. The far-rightists have fanned fears of Islam and of crime, helped along by fake news on social media.

Whatever Swedish government eventually forms must join its liberal counterparts in attempting to find new ways to defuse the far-right forces, rather than conceding to them. It will likely be a long and difficult struggle, particularly while the populists can find support from a U.S. president who spews hateful rhetoric against nonwhite and non-Christian immigrants. The triumph of liberal democracy is anything but assured. In that sense, Sweden’s election is cause for relief, but not complacency.