Dutch people rejected "the wrong kind of populism", Prime Minister Mark Rutte has said, as he celebrated victory in Wednesday's election.
"The Netherlands said 'Whoa!'" he declared after his centre-right VVD party's lead positioned him for a third successive term as prime minister.
With nearly all votes counted, his party easily beat the anti-immigration Freedom party of Geert Wilders.
Fellow eurozone countries France and Germany also face elections this year.
The Dutch race was seen as a test of support for nationalist parties that have been gaining ground across Europe.
Mr Wilders insisted "the patriotic spring" would still happen.
The euro gained as the results pointed to a clear victory for the prime minister's party.
How big is Rutte's win?
With all but two vote counts complete, the prime minister's party has won 33 out of 150 seats, a loss of eight seats from the previous parliament.
The Freedom party was in second place on 20 seats, a gain of five, with the Christian Democrats (CDA) and the liberal D66 party close behind with 19 seats each.
The Green-Left party also did well, winning 14 seats, an increase of 10.
The Labour Party (PvdA), the junior party in the governing coalition, suffered a historic defeat by winning only nine seats, a loss of 29. Labour's defeat appeared to signal voters shifting to the right, as many of the seats it lost did not go to other left-wing parties.
"All in all the left has never been smaller than this," said outgoing Finance Minister Jeroen Dijsselbloem.
Turnout was 80.2%, which analysts say may have benefited pro-EU and liberal parties. The number of voters was a record 10.3 million, according to public broadcaster NOS.
"We want to stick to the course we have - safe and stable and prosperous," Mr Rutte said.
What does this mean for the EU?
France goes to the polls next month to elect a new president, with the far right National Front forecast to increase its vote dramatically.
In Germany, the populist Alternative for Germany (AfD) may win seats in parliament for the first time in September's general election.
Mr Rutte had already spoken of the election as a quarter-final against populism ahead of the French and German polls. And his victory was warmly greeted by other European leaders and politicians:
- French President Francois Hollande said he had won a "clear victory against extremism"
- German Chancellor Angela Merkel hailed a "very pro-European result, a clear signal... and a good day for democracy" and her chief of staff, Peter Altmaier, tweeted: "The Netherlands, oh the Netherlands you are a champion!"
- Spanish Prime Minister Mariano Rajoy praised Dutch voters for their "responsibility"
- Martin Schulz, president of the European Parliament until earlier this year, said he was relieved the Freedom Party had lost. "We must continue to fight for an open and free Europe!" he added on Twitter (in German)
Where does Wilders stand now?
Weeks before the election, opinion polls forecast the PVV winning the biggest number of seats but Mr Wilders' lead vanished as the vote drew near.
He had pledged to take the Netherlands out of the EU, close all mosques and ban the Koran.
He warned that Mr Rutte had "not seen the last" of him.
"It's not the 30 seats I hoped for but we have gained seats," he added. "This patriotic spring will happen."
Defeated Labour leader Lodewijk Asscher agreed that "populism is not over". The anger and insecurity of voters was reflected in the increased vote for Mr Wilders and the wider fragmentation of Dutch politics, he said.
Did Wilders fail?
In reality his party gained five seats and, as he pointed out, it is now the second biggest in parliament not the third.
But his decline in the polls was clear and it is being seen partly as self-inflicted.
He refused to take part in two TV debates because of scathing comments about him made by his brother, Paul, on the same TV channel. And many of the public comments he made during the campaign were to foreign journalists.
But it was as much Mark Rutte's success as Geert Wilders' failure. The prime minister's response to Nazi slurs against the Dutch made by Turkey's President Erdogan was praised across the political spectrum.
There was no let-up in Turkey's rhetoric on Thursday, when Foreign Minister Mevlut Cavusoglu complained that Europe's politicians were "taking Europe toward an abyss", adding: "Soon religious wars will break out in Europe. That's the way it's going."
How long before a new government is formed?
As parliamentary seats are allocated in exact proportion to a party's vote share, the VVD will need to go into coalition with three other parties.
If recent Dutch history teaches you anything about coalition-building, it is that it will not happen overnight. In 2012 it took 54 days, and that was relatively fast as it involved just two parties.
Mr Rutte has spoken of a "zero chance" of working with Mr Wilders' PVV, and will look instead to the Christian Democrats and D66, which are both pro-EU. It would still be several seats short of forming a government and would need further support from a fourth party. The Christian Union might be one option, another could be Green-Left.
The VVD has much in common with the liberal D66 in backing progressive policies on soft drugs and assisted dying. But that would be resisted by both parties with a Christian background. The path to a coalition will not be easy.
- VVD - People's Party for Freedom and Democracy (Leader: PM Mark Rutte)
- PVV - Freedom Party (Leader: Geert Wilders)
- CDA - Christian Democratic Appeal (Leader: Sybrand Buma)
- D66 - Democrats 66 (Leader: Alexander Pechtold)
- Green-Left - (Leader: Jesse Klaver)
- SP - Socialist Party (Leader: Emile Roemer)
- PvdA - Labour Party (Leader: Lodewijk Asscher)