Dutch Prime Minister Mark Rutte says the Netherlands has rejected "the wrong kind of populism" as he celebrated victory in parliamentary elections.
With nearly all votes counted his governing centre-right VVD party easily beat the anti-immigration, anti-EU Freedom party of Geert Wilders.
The 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.
With more than 90 per cent of votes counted, the VVD had won 33 out of 150 seats, a loss of eight seats from the previous parliament.
Mr Wilders' Freedom Party (PVV) was in second place on 20 seats, a gain of five, with the Christian Democratic Appeal (CDA) and the liberal Democrats 66 (D66) 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 with only nine seats, a loss of 29.
Turnout was more than 80 per cent, the highest for 30 years, which analysts say may have benefited pro-EU and liberal parties.
In the run-up to the election, some opinion polls had forecast the PVV winning the biggest number of seats, sending alarm bells ringing across European capitals.
Mr Wilders had pledged to take the Netherlands out of the EU, close all mosques and ban the Koran.
"The Netherlands said 'Whoa!' to the wrong kind of populism," said Mr Rutte, now poised for a third successive term as prime minister.
"We want to stick to the course we have - safe and stable and prosperous."
Mr Rutte's victory was warmly greeted by other European leaders.
French President Francois Hollande said Mr Rutte had won a "clear victory against extremism" while German Chancellor Angela Merkel's chief of staff, Peter Altmaier, tweeted: "The Netherlands, oh the Netherlands you are a champion! Congratulations on this great result."
Many had been watching the vote in the Netherlands closely, as an indication for how populist parties may fare in other elections in EU countries.
France goes to the polls next month to elect a new president, while Germany is due to hold a general election in September.
Martin Schulz, president of the European Parliament until earlier this year, said he was "relieved" Mr Wilders' party had lost.
"We must continue to fight for an open and free Europe!" he added on Twitter (in German).
However, Mr Wilders warned that Mr Rutte "has not seen the last of me".
"It's not the 30 seats I hoped for but we have gained seats," Mr Wilders said, adding: "This patriotic spring will happen."
As parliamentary seats are allocated in exact proportion to a party's vote share, the VVD party will need to go into coalition with other parties.
The VVD had ruled out a coalition with the Freedom Party but not with the other two runners-up, the CDA and D66, which are both pro-EU.
Coalition talks could take weeks, or even months.