(CNN) -- Dutch Prime Minister Jan Peter Balkenende resigned Wednesday as leader of the Christian Democratic Alliance after exit polls from the country's national elections projected that his party would lose 20 of its 41 parliamentary seats.
Balkenende, who also gave up his seat in parliament, will remain in office as prime minister until a new coalition government is formed, said Xander van der Wulp, political editor for CNN affiliate NOS.
That process could take months because no clear winner was projected in Wednesday's elections.
The exit polls showed the center-right Liberal Party and center-left Labor Party tying with 31 seats each, while the far-right, anti-Islam Freedom Party of controversial Dutch politician Geert Wilders more than doubled its seats, going from nine to 23 -- far ahead of analyst expectations.
With its strong showing at the polls, there was speculation that the Freedom Party could play a role in a forthcoming coalition government.
Opinion polls earlier had predicted the Liberal Party, led by Mark Rutte, would come out on top. Rutte had promised to lower taxes and dramatically slash government spending to bring the country's budget quickly back to surplus.
Former Amsterdam Mayor Job Cohen's Labor Party was the other major contender in Wednesday's election. As mayor, Cohen built a strong reputation for easing community tensions by extending friendship and showing tolerance to the city's Muslims.
It was Labor's withdrawal from the coalition government earlier this year in a dispute over troops in Afghanistan that set the stage for the current elections. The issue has barely surfaced in the campaign.
The Liberal Party's Rutte has suggested he may be willing to form a coalition with Wilders' Freedom Party, but the choice could be divisive. Wilders has become internationally famous for his fight against the "Islamization" of the Netherlands.
"I believe we should have a stop of the mass immigration from Islamic countries," he said in an interview, "not because the people are bad, but because they bring a culture that really is against everything in our own values."
Wilders is currently facing trial on charges of inciting discrimination and hatred, charges related in part to his much-criticized film about Islam, "Fitna." The trial is expected to get under way later this year.
Wilders is also charged with offending a group of people, which relates to his comparison of Islam to Nazism.
The charges relate to comments Wilders made in a variety of media between 2006 and 2008, including an October 2006 interview with the Dutch newspaper De Volkskrant in which he said he wanted to stop the "tsunami of Islamization," and another in September 2007 with Radio Netherlands in which he said the Quran should be banned.
"Fitna," which Wilders released online in March 2008 to international outcry, is also part of the charges against him. The film features disturbing images of terrorist acts superimposed over verses from the Quran in order to paint Islam as a threat to Western society.
Wilders would face up to two years in prison and a fine of 19,000 euros (about $23,000) for each charge if convicted.
CNN's Phil Black contributed to this report.