THE HAGUE — The far-right politician Geert Wilders fell short of expectations in Dutch elections on Wednesday, gaining seats but failing to persuade a decisive portion of voters to back his extreme positions on barring Muslim immigrants and jettisoning the European Union, according to early results and exit polls.
The results were immediately cheered by pro-European politicians who hoped that they could help stall some of the momentum of the populist, anti-European Union and anti-Muslim forces Mr. Wilders has come to symbolize, and which have threatened to fracture the bloc.
Voters, who turned out in record numbers, nonetheless rewarded right and center-right parties that had co-opted parts of his hard-line message, including that of the incumbent prime minister, Mark Rutte. Some parties that challenged the establishment from the left made significant gains.
The Dutch vote was closely watched as a harbinger of potential trends in a year of important European elections, including in France in just weeks, and later in Germany and possibly Italy. Many of the Dutch parties that prevailed favor the European Union — a rare glimmer of hope at a time when populist forces have created an existential crisis for the bloc and Britain prepares for its withdrawal, or “Brexit.”
“The Netherlands, after Brexit, after the American elections, said ‘Whoa’ to the wrong kind of populism,” Mr. Rutte told a wildly enthusiastic crowd, excited that his party, the People’s Party for Freedom and Democracy, had come in first among the parties and lost fewer seats than it had feared.
“Today was a celebration of democracy, we saw rows of people queuing to cast their vote, all over the Netherlands — how long has it been since we’ve seen that?” Mr. Rutte said.
Alexander Pechtold, the leader of Democrats 66, which appeared to have won the most votes of any left-leaning party, struck a similar note underscoring the vote as a victory against a populist extremist.
“During this election campaign, the whole world was watching us,” Mr. Pechtold said. “They were looking at Europe to see if this continent would follow the call of the populists, but it has now become clear that call stopped here in the Netherlands.”
In the Netherlands, the results betrayed a lingering distrust of turning over the reins of power to the far right, even as its message dominated the campaign and was likely to influence policies in the new government.
Yet there are limits to how much the Netherlands, one of Europe’s most socially liberal countries, will be a reliable predictor for Europe’s other important elections this year, including next month’s presidential elections in France.
Mark Bovens, a political scientist at Utrecht University, noted that Mr. Wilders and other right-wing parties, despite their gains, did not drastically cross traditional thresholds.
“The nationalist parties have won seats, compared to 2012 — Wilders’s party has gained seats, as has a new party, the Forum for Democracy — but their electorate is stable, it has not grown,” Mr. Bovens said.
Mr. Bovens pointed out that an earlier populist movement led by the right-wing politician Pim Fortuyn won 26 seats in 2002 and that Mr. Wilders’s won 24 seats in 2010. Even if Mr. Wilders’s party rises to 19 seats, from 15 in the current Parliament, as the early returns seemed to indicate, it will still be lower than the previous high-water marks.
“And some of the traditional parties have moved in a more nationalistic direction, taking a bit of wind out of his sails,” he said. “You see the same strategy in Germany.”
The German governing coalition led by Chancellor Angela Merkel, which is facing a stiff election challenge of its own this year, was clearly buoyed by the Dutch result, its foreign ministry sending a warmly enthusiastic message via Twitter.
“Large majority of Dutch voters have rejected anti-European populists. That’s good news. We need you for a strong #Europe!” it read.
In the Netherlands’s extremely fractured system of proportional representation — 28 parties ran and 13 are likely to have positions in the 150-seat lower house of Parliament — the results were, not atypically, something of a dog’s breakfast.
Mr. Rutte’s party lost seats, even as it came out on top, and will need to join forces with several others in order to wield power. Virtually all parties said they would not work with Mr. Wilders in a coalition — so toxic he remains — though his positions are likely to infuse parliamentary debate.
“Rutte has not seen the last of me yet!” Mr. Wilders wrote on Twitter, and indeed his anti-immigrant message, which dominated much of the campaign, was not likely to go away.
It came into particularly sharp relief on the eve of the election, when Turkey’s foreign minister sought to enter the Netherlands to rally support among Turks in Rotterdam for a referendum to increase the power of the Turkish president, Recep Tayyip Erdogan. Dutch officials refused him landing rights.
Mr. Wilders, who has seemed to relish being called the “Dutch Donald Trump,” has been so extreme that some appear to have thought twice about supporting him.
He has called for banning the Quran because he compares it to Hitler’s work “Mein Kampf,” which the Netherlands banned, and for closing mosques and Islamic cultural centers and schools.
Election turnout was high, with polling places seeing a steady stream of voters from early morning until the polls closed at 9 p.m. Of the 12.9 million Dutch citizens eligible to cast ballots, more than 80 percent voted.
Some polling places ran out of ballots and called for additional ones to be delivered. There were so many candidates listed that the ballots were as voluminous as bath towels and had to be folded many times over to fit into the ballot box.
The percentage of the vote that a party receives translates into the number of seats it will get in Parliament. If a party gets 10 percent of the total votes, it gets 10 percent of seats in the 150-seat Parliament, given to its first 15 candidates listed on the ballot.
The election was a success for the left-leaning Green Party, led by 30-year-old Jesse Klaver, a relative political newcomer, whose leadership at least tripled the party’s seats, making it the fifth-place finisher and potentially a part of the government.
Mr. Klaver ran specifically on an anti-populist platform and worked hard to turn out first-time voters.
“In these elections there was an overwhelming attention from the foreign press, which is understandable because Brexit happened and Trump was elected, and because France, Germany and maybe Italy will be holding elections,” Mr. Klaver said. “They asked us: Will populism break through in the Netherlands?”
The crowd shouted: “No.”
“That is the answer that we have for the whole of Europe: Populism did not break through,” Mr. Klaver said.
Another striking development was the first-time election of former Labor Party members, all three of Turkish background, who formed a new party, Denk (which means “think”). It will be the only ethnic party in the Dutch Parliament and is a reminder that Turks are the largest immigrant community in the Netherlands. There are roughly 400,000 first, second, or third-generation Turkish immigrants in the nation.
The big loser was the center-left Labor Party, which was expected to drop from being the second largest party in Parliament, with 38 seats and a position as Mr. Rutte’s coalition partner. The party was expected to win only nine or 10 seats.
In past elections the impact of extremist right-leaning parties has been largely blunted by a political system that for more than a century has resulted in governance by coalition.
This year’s election may give the Netherlands its most fragmented government in history. Some political analysts believe it could take weeks or months to form a government and that the governing coalition will be fragile.
In Belgium, which has a similar political system as the Netherlands, it famously took nearly a year and a half after inconclusive elections in June 2010 to form a government.