Dutch Prime Minister
Exit polls released moments after voting ended suggested Rutte's center-right People's Party for Freedom and Democracy won 31 seats in the 150-member legislature,while Wilders' far-right Freedom Party won 19 seats, the same as two other parties.
"It was a festival of democracy with queues outside polling stations. We haven't seen that for a long time," Rutte told supporters, according to Dutch media. "We wanted to keep the country secure, stable and prosperous. People have heard that message."
On Twitter, Wilders wrote: "We have won seats! That's the first victory! Rutte has not seen the last of me yet!!" The party won 15 seats in the 2012 election.
Although the exit poll results are only projected results, they have been an accurate measure of the final tally in previous Dutch elections.
The biggest loser of the night appeared to be the left-wing bloc in Dutch politics, which had been dominant. Exit polls predicted the
Previous Dutch elections have not attracted as much attention as this one, but many observers around the world have their eyes on the outcome to see whether Europe will swing right, despite its fraught history fighting fascism.
Martin Schulz, who was president of the European Parliament until earlier this year, wrote on Twitter: "I'm relieved. But we must continue to fight for an open and free Europe!"
The Netherlands contest is the first of three crucial elections in the continent this year — ahead of France in April and May and Germany in September.
It comes after the British referendum decision in June to leave the
The race has been bitter and divisive with immigration dominating the discourse.
Wilders, a passionate anti-Muslim politician who has called for the Netherlands' mosques to be shuttered and borders to be closed to asylum seekers and immigrants from Islamic countries, surged in the polls in recent months but the popularity of his party has waned in the last few weeks.
During the final televised debate of the campaign Tuesday evening, more than 3 million people tuned in to hear the main candidates thrash it out.
In one particularly heated exchange, Deputy Prime Minister Lodewijk Asscher of the Labor Party attempted to defend the rights of law-abiding Muslims who live in Holland.
"The Netherlands belongs to all of us, and everyone who does his best," he said.
But Wilders retorted: "The Netherlands is not for everyone. The Netherlands is for the Dutch."
After casting his vote Wednesday, Rutte, who has been prime minister since 2010, urged people to try to imagine the global reaction if the Freedom Party secured the largest percentage of votes.
"I think the rest of the world will then see that after 'Brexit,' after the American elections, again the wrong sort of populism has won the day," he said.
Recent surveys suggested that about half of eligible voters were still undecided heading into the ballot booths Wednesday, but it was a political contest that people cared about deeply.
Voter turnout was 82%, according to the Ipsos exit poll, up from 74.6% in 2012.
Polls also showed that an ongoing diplomatic fight between Turkey and the Netherlands appeared to have given a last-minute boost to Rutte's ratings.
The row with Turkey stemmed from the government's decision to ban two Turkish ministers from speaking at rallies in Holland because of concerns regarding "risks to public order and security."
The speeches were intended to encourage the large Turkish expatriate population to vote “yes” in the upcoming Turkish referendum, which could expand President
The Dutch felt the proposed presentations were ill-timed given the heightened concerns about immigration and Islamic radicalization dominating much of the election rhetoric in the Netherlands. But Erdogan accused Holland of using "Nazi" tactics and blocked the Dutch ambassador from returning to the Turkish capital, Ankara.
The Dutch political system is based on proportional representation, which means the 150 parliamentary seats are allocated in exact proportion to the amount of votes each party wins. After the votes have been counted and official results announced, protracted discussions will take place to form the next coalition government.
Even if Wilders' party gains the second-highest number of votes in the final tally, many other parties have said they would not enter into a partnership with him.
Despite this, Wilders sounded an ominous tone after voting Wednesday, saying that "the genie will not go back into the bottle."
"This patriotic revolution, whether today or tomorrow, will take place," he said in The Hague.
Boyle is a special correspondent.
3:35 p.m.: This article was updated with additional exit poll indications and reaction.
1:25 p.m.: This article was updated with early indications from an exit poll.