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% 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%, 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.
Image copyrightAFPImage captionGeert Wilders said his party's gains were "a result to be proud of"
"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.
Voters are due to go to the polls across the Netherlands in a closely watched general election.
The race, dominated by PM Mark Rutte's centre-right party and that of anti-immigrant politician Geert Wilders, is seen as a test of nationalist feeling.
Mr Rutte has said the election is an opportunity for voters to "beat the wrong sort of populism".
Mr Wilders has pledged to take the Netherlands out of the EU, close all mosques and ban the Koran.
His Freedom Party had been leading in opinion polls but they have since suggested his support may be slipping.
Wednesday's vote is the first of three significant elections in Europe this year - in the Netherlands, France and Germany - where the power of populist parties will be put to the test.
Image copyrightREUTERSImage captionProtracted coalition talks are expected after the results are announced
The BBC's Damian Grammaticas in The Hague says that while a populist surge is still possible in Wednesday's election, a host of other parties could also do well, leaving Dutch politics fragmented.
As parliamentary seats are allocated in exact proportion to a party's vote share and no major party wants to be in a coalition with Mr Wilders, he has little chance of entering government however well he performs, our correspondent says.
In the run-up to the vote, party leaders took part in televised debates, with Mr Rutte and Mr Wilders clashing over how to stem immigration.
Mr Rutte dismissed Mr Wilders' plan to close borders and mosques and to ban the Koran as "fake solutions". Mr Wilders accused Mr Rutte of providing better healthcare for immigrants than for the Dutch themselves.
Labour Party leader Lodewijk Asscher called Mr Wilders a man of "10,000 angry tweets and no solutions".
Image copyrightAPImage captionA protest by hundreds of Dutch-Turks in Rotterdam ended in chaos
The row with Turkey followed Mr Rutte's decision to ban two Turkish ministers from addressing rallies in the country. In response, Turkish President Recep Tayyip Erdogan accused the Netherlands of being "Nazi remnants".
Mr Wilders described protesters who rioted outside the Turkish consulate in Rotterdam at the weekend as "scum".
One opinion poll suggested that the spat, and the riots in Rotterdam, had given anti-immigrant parties a boost.
Wednesday's election is expected to be followed by protracted coalition talks.
Analysts say a strong showing for Mr Wilders could foreshadow next month's presidential election in France, where far-right, anti-EU contender Marine Le Pen has widespread support, and September's election in Germany, where another right-wing party, Alternative for Germany, is expected to win seats for the first time.