THE HAGUE, Netherlands (AP) — An exit poll immediately after voting ended Wednesday in the Dutch general election suggested that caretaker Prime Minister Mark Rutte's conservative party won the most seats, putting him first in line to form a new ruling coalition.

Rutte, 54, has been in power for more than a decade at the head of three different coalitions and could become the country’s longest-serving prime minister if he manages to form a new coalition.

The Ipsos poll for national broadcaster NOS forecast that Rutte’s People’s Party for Freedom and Democracy would win 35 of the 150 seats in the lower house of parliament.

However, Ipsos said before the poll that uncertainty caused by voting in the COVID-19 pandemic makes the margins of error larger than in other elections.

“A difference of two seats per party could happen more often. A difference of more than two seats cannot be completely ruled out,” Ipsos said in a statement.

Counting votes at municipalities throughout the nation of more than 17 million is expected to last through the night.

The Dutch voted, practicing strict social distancing, at thousands of polling stations on Wednesday's final day of an election overshadowed by the coronavirus pandemic.

School gyms, churches, museums, concert halls and at least one windmill were pressed into service as voting centers by authorities looking for venues where people could vote safely amid rising infection rates. In Amsterdam, cyclists and drivers voted in a drive-thru facility at a conference center.

Rutte's popularity rose sharply last year as he steered his country through the pandemic that has killed more than 16,000 people in the Netherlands and plunged the prosperous nation of just over 17 million into recession. But that popularity eroded in recent weeks as public support for a months-long lockdown declined and his government resigned over a scandal involving tax officials wrongly labeling thousands of families as fraudsters.

Rutte stressed the pandemic as a campaign theme, after cycling to a primary school in The Hague to cast his vote.

“The main question during these elections on the table is who best can lead this country forward through the crisis of corona and then make a new start with this country,” he said.

Anti-immigration lawmaker Geert Wilders insists Rutte is not that man.

“I don’t blame government for the virus, I blame them for not being prepared enough for that," Wilders said. "But especially for giving our country away, giving out values away, giving our culture away, giving our money away. And I believe that Dutch should go first.”

Voters also had other issues on their minds, from the climate to housing shortages, health care funding and the Netherlands' place in Europe.

But for Sandra Mulder, 58, the pandemic was the dominant theme as she voted at the same polling station as Rutte.

“It is mainly, how do we move on? What steps are necessary? How do we ensure that our future generations are burdened as little as possible with the legacy of corona?” she said.

A pre-election version of the respected Peilingwijzer survey of different opinion polls predicted Wilders’ party would win 18-20 seats while the centrist D66 party, led by the country's minister for foreign trade and development cooperation, Sigrid Kaag, is polling close to Wilders in third place. The Netherlands has never had a woman as prime minister and Kaag has positioned herself in the campaign as a viable alternative to Rutte.

Voting began Monday and Tuesday, ostensibly for people considered to be in high risk groups for the virus. People aged over 70 also had the option of mail-in voting.

The procedure for opening and counting postal votes had to be changed mid-election Tuesday after what the interior ministry called “procedural mistakes” by voters mailing in their ballots.

A record 37 parties took part in the election, with up to 17 forecast to garner enough votes to win at least one seat in parliament. That splintering of the political landscape is likely to make coalition formation negotiations a tough and lengthy process.

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.