Mark Rutte, the Dutch prime minister, has easily defeated his far-right rival Geert Wilders, partial vote counts show, in elections seen as a measure of populist support in Europe.

With more than 93 percent of votes counted, Rutte's liberal VVD party was set to win 33 seats, making it the largest in the new 150-seat parliament, with Wilders and his Freedom Party (PVV) beaten into second place with 20 seats, the Dutch national broadcaster NOS said on Thursday.

Millions of Dutch flocked to the polls in a near-record turnout, with the stakes high in an election pitting the pro-European Rutte against his anti-immigration and anti-EU rival.

After last year's shock Brexit referendum and Donald Trump's victory in the United States, the Dutch vote was being closely scrutinised as a gauge of the rise of populism on the continent before crucial elections in France and Germany.

OPINION: What can the Dutch elections tell us about Europe?

"This was the evening when The Netherlands, after Brexit and the American elections, said 'stop' to the wrong kind of populism," Rutte told supporters.

"Now of course it's important to unite the country in the coming weeks and months and that we succeed in forming a stable government for the next four years."

Relieved European leaders, fearing the rise of anti-EU sentiment in one of the bloc's founding members, congratulated Rutte, now headed for a third term at the head of the one the euro zone's largest economies.

Jean-Claude Juncker, the EU Commission chief, praised the result as a "vote against extremists" while one senior European source told AFP news agency on condition of anonymity: "Common sense strikes back."

Jean-Marc Ayrault, French foreign minister, congratulated Rutte for "stopping the rise of the far-right". Marine Le Pen, the French far-right candidate, is currently seen as winning the first round of the presidential election in April.

'Not rid of me yet'

Wilders had pledged to close the borders to Muslim immigrants, shut mosques, ban sales of the Quran and leave the EU if he won the polls.

He thanked his supporters in a message on Twitter, with his party set to boost its number of MPs to 19. The PVV won 15 seats in the 2012 elections, which had slipped to 12 in the outgoing parliament.

"We won seats. The first gains are made. And Rutte is not rid of me yet," he said.

READ MORE: Who is who in the Dutch elections?

Eyeing weeks, if not months, of protracted coalition talks ahead, Wilders offered early on Thursday to work with the new government.

"I would still like to co-govern as the PVV, if possible. But if that doesn't work ... we'll support the cabinet, where needed, on the issues that are important to us."

Most of the other leaders, including Rutte have vowed not to work with Wilders, denouncing his incendiary rhetoric and his go-it-alone attitude.

Rutte appeared to have benefited from his firm stance in a spiralling diplomatic spat with Turkey after authorities barred Turkish ministers from rallying support in the Netherlands for a referendum.

'No Trumpian force'

Assuming the exit polls reflect the final result, Rutte will get the first chance to form the next coalition and could possibly turn to the Christian Democratic Appeal (CDA) and the Democracy party D66, which both matched Wilders with a predicted 19 seats.

But with the three parties' combined total of 71 seats, he would need another party to reach the 76-seat majority.

The "PVV is not such a revolutionary, Trumpian force," Leiden University expert Geerten Waling told AFP.

Prognosis after 93 percent of votes counted VVD 33 PvdA 9 PVV 20 SP 14 CDA 19 D66 19 ChristenUnie 5 GroenLinks 14 SGP 3 PvdD 5 50Plus 4 Denk 3 FvD 2

"People stick to responsible politicians mostly," he said, acknowledging though that the PVV's showing was "not small".

The analyst also pointed to the "disastrous" showing of the traditional Labour party, Rutte's sole partner in the outgoing coalition.

Support for the party appears to have evaporated and the partial count showed it winning only nine seats - well down from the 38 it won in 2012.

Labour leader Lodewijk Asscher told supporters late on Wednesday "the voters have spoken, difficult as it is, but that is democracy".

One of the biggest winners of the day was the Jesse Klaver, the young leader of the ecologist left-wing GroenLinks.

In a remarkable turnaround, the party is likely to win 14 seats compared with only four in the outgoing parliament.