Provisional results with over half the votes counted suggested Mr Rutte’s party won 32 seats in the 150-member legislature, 13 more than Mr Wilders’ party, which took only third place with 19. The surging CDA Christian Democrats claimed 20.
Following Britain’s vote to leave the European Union and Donald Trump’s election as US president, “the Netherlands said, ‘Whoa!’ to the wrong kind of populism,” said Mr Rutte, who is now poised for a third term as prime minister.
“We want to stick to the course we have - safe and stable and prosperous,” he added.
Scottish First Minister Nicola Sturgeon welcomed the result, simply tweeting: “Good.”
Mr Wilders campaigned on radical pledges to close borders to migrants from Muslim nations, close mosques, ban the Koran and take the Netherlands out of the EU.
He had insisted that whatever the result of the election, the kind of populist politics he and others in Europe represent are not going away.
“Rutte has not seen the back of me,” Mr Wilders said after the results had sunk in.
His Party for Freedom clinched 24 seats in 2010 before sinking to 15 in 2012, and Wednesday’s total left him with about 12 per cent of the electorate, far less than populists in Britain and the US have scored.
Both France and Germany have elections this year in which far-right candidates and parties are hoping to make an impact.
French President Francois Hollande congratulated Mr Rutte on his election success and his “clear victory against extremism”.
In Germany, Socialist leader Martin Schulz tweeted. “I am relieved, but we need to continue to fight for an open and Free Europe.”
Mr Rutte, who for much of the campaign appeared to be racing to keep pace with Mr Wilders, may have profited from the hard line he drew in a diplomatic stand-off with Turkey over the past week.
The fight erupted over the Netherlands’ refusal to let two Turkish government ministers address rallies in Rotterdam about a referendum that could give Turkey’s President Recep Tayyip Erdogan more powers.
It gave Mr Rutte an opportunity to show his statesmanship by refusing to bow to foreign pressure, a stance with widespread backing in the nation.
Under brilliant skies, the Dutch went to vote in huge numbers, with turnout estimated to have reached at 82 per cent.
The Green Left party registered a historic victory, turning it into the largest party on the left wing of Dutch politics, together with the Socialist Party.
The provisional results showed the Greens leaping from four seats to 14 in parliament after a strong campaign by charismatic leader Jesse Klaver.
It remains to be seen if the 30-year-old Mr Klaver will take his party into the next ruling coalition, which looks likely to be dominated by Mr Rutte’s VVD and other right-leaning parties.
The Labor Party of Jeroen Dijsselbloem appeared to have been punished by voters in the election, plunging from 38 seats at the last election to just nine, according to the Ipsos exit poll.
Mr Rutte had framed the election as a choice between continuity and chaos, portraying himself as a safe custodian of the nation’s economic recovery and casting Mr Wilders as a far-right radical who was unprepared to make tough decisions.
He has been resolute about not wanting to share power with Mr Wilders, and weeks, if not months of coalition talks may be required before he can reach the necessary 75-seat threshold and a new government is installed.