Rising migration across Europe, including the biggest surge in asylum seekers since a 2015-2016 migrant crisis, is fueling support for far-right and anti-immigration parties, potentially reshaping European politics for years.

Nationalist parties that champion a harder line against immigration are surging in polls and have entered governmentsin countries from Italy to Finland, as anxiety rises about sluggish economic growth and crises from Ukraine to the Middle East. The far right is polling strongly in the continent’s two largest countries, Germany and France.

This week’s victory in Dutch elections by far-right politician Geert Wilders, who has placed anti-migration policies at the heart of his political platform for the last 15 years, was a powerful sign of how voters are drifting to antiestablishment politicians, analysts said. He will still need to form a coalition in a fractured political landscape, which likely means softening some of his policy goals, but said Thursday that he wants to become prime minister.

Wilders has said he wants strict limits on immigration and no longer wants the Netherlands to accept any asylum seekers. During the election campaign, Wilders tied problems such as the high cost of living and lack of affordable housing to his migration theme, arguing that by slashing the numbers of people who come to the Netherlands, the government could have more money to address other problems.

“It all resonated with his key political message—that it’s time to put the Dutch people first again,” said Rem Korteweg, a senior fellow at the Clingendael Institute think tank in the Netherlands.

Europe is on track to receive more than a million asylum applications this year, the highest since 2015-2016 when a wave of migrants mostly from the Middle East and Africa sparked a crisis. In September alone there were 108,000 applications, similar to the levels of 2015, according to EU data.Migrants have reached the EU this year primarily by land through the Balkans and by sea across the Mediterranean to Italy.

The figures don’t include roughly 4.2 million displaced Ukrainians who have received temporary protection status across Europe since Russia’s invasion of Ukraine. Overall, migration has hit at least 15-year highs in a number of European countries including Belgium, Denmark, Finland, France, Ireland, Luxembourg, the Netherlands, Spain, Switzerland and the U.K., according to data from the Organization for Economic Cooperation and Development.

The Netherlands net migration figure rose to almost 223,000 in 2022, the highest in two decades in the country of 17.5 million. Last year, asylum applications in the Netherlands rose by a third to 46,400. The Dutch cabinet said in April that it was expecting more than 70,000 asylum claims in 2023, excluding Ukrainians, topping the roughly 59,000 people who arrived in 2015 at the peak of the migration crisis.

Voters can become anxious about immigration when they perceive it to be out of control, such as when people cross the English Channel or the Mediterranean in small boats or illegally breach the U.S. southern border, said Alan Manning, professor of economics at London School of Economics and former chair of the U.K. Migration Advisory Committee, which advises the U.K. government on immigration policy. Problems arise when “there’s no ability to say enough—we don’t want this.”

In September, Slovakia’s former Premier Robert Fico returned to power in part by highlighting a surge in illegal migration. That followed victories last year by Italy’s right-wing Giorgia Meloni and a new coalition government in Finland earlier this year that included the far-right Finns Party, which made anti-immigration its central pitch.

Germany’s far-right Alternative for Germany has moved into second place in the polls over the past year, increasing its share of support by around a third to rise above 20%.

While French elections won’t be held until 2027, a recent IFOP poll for French newspaper Le Figaro gave Marine Le Pen’s opposition National Rally party an eight-point lead over President Emmanuel Macron’s Renaissance.

The surge in asylum seekers is driving many countries to try new policies. Italy struck a deal with Albania for asylum seekers to wait there while their cases are decided in Italy, and Germany recently said it was considering deals with other countries, including some in Africa, to house asylum seekers. An attempt by the U.K. to send migrants to Rwanda has so far been blocked in court. Other countries, such as Hungary, have erected border fences to block asylum seekers.

The rise in legal migration is unfolding as Europe faces severe labor shortages in places such as Germany and the Netherlands, which could worsen as the region’s workforce ages and retires. But it also comes during a period of widespread voter disenchantment, partly caused by slow economic growth and high inflation postpandemic and the Ukraine war, which has driven down households’ purchasing power.

In Sweden, the government has blamed a rise in violent crime in part on the failure to integrate migrant communities and recently proposed changes that would allow the country to expel migrants or asylum seekers who associate with criminal groups. In Germany, hundreds of thousands of refugees arriving in recent years from Afghanistan and Syria have struggled to enter the country’s labor market, according to official data.

Even in countries where far-right parties haven’t risen strongly in polls, there are signs of social strain. In Dublin, crowds rioted on Thursday, smashing buses and looting stores in what police described as the worst social unrest in the Irish capital in decades. It followed a stabbing at a school that far-right groups attributed to a foreign migrant. Police haven’t identified an assailant.

“Migration is a difficult topic to talk about in politics at the moment,” Irish Prime Minister Leo Varadkar told a news conference. “In the round, it has been a good thing for Ireland.”

Once in power, parties have discovered that reducing migration is easier said than done. The European Union’s setup makes a crackdown on migration and asylum seekers especially difficult. The bloc’s border-free Schengen zone, the free movement of labor across the continent, and EU rules committing countries to take in asylum claimants fleeing from war or persecution complicate anti-migration plans.

Despite Italy having elected a right wing anti-migration government last year, the number of migrants arriving by sea in to the country so far this year is close to levels last seen during the migration crisis.

The U.K. formally left the EU in 2020 partly to have greater control over its borders by ending the right of Europeans to move to the U.K. without a visa. Last year, legal immigration to the U.K. hit a record 745,000 and remained high in the first half of this year, driven partly by an increase in workers to fill jobs in fields such as nursing, according to data published on Thursday by the national statistics office. The government is also struggling to reduce the numbers of asylum seekers arriving by sea.

Write to Laurence Norman at laurence.norman@wsj.com and Tom Fairless at tom.fairless@wsj.com