Dutch far-right politician Geert Wilders of the PVV party votes in the general election in The Hague, Netherlands, March 15, 2017. Reuters

Voters in the Netherlands headed to the polls Wednesday for an election that was expected to test the country’s tolerance for immigration and the Islamic religion. The front-runners were incumbent Conservative Prime Minister Mark Rutte and his far-right rival Geert Wilders, who has reportedly campaigned to take the Netherlands out of the EU, close all Muslim mosques and ban the Koran.

After casting his own ballot Wednesday, Rutte, the candidate for the Freedom and Democracy political party, referred to the election as a chance for Dutch voters to “beat the wrong sort of populism.” Though the latest Peilingwijzer poll of polls projected Rutte winning, it also showed that Wilders, who pledged to hold a Brexit-style referendum on quitting the European Union, was close behind.

Read: Dutch Parliamentary Elections: Will Far-Right Freedom Party Defy Polls Again?

In the final debate leading up to the race Tuesday night, Rutte rejected Wilders’ plan to close Dutch borders to immigration entirely as a “fake solution.” Wilders responded by saying Rutte's administration provided better healthcare to immigrants than Dutch citizens themselves. Under Rutte, undocumented migrants were granted access to primary, secondary and tertiary care.

The elections were on the heels of Rutte's decision to ban two Turkish ministers from addressing Turks at a political rally Saturday in the eastern city of Rotterdam, resulting in wide-scale demonstrations outside the Turkish consulate there. Turkish President Recep Tayyip Erdogan responded that the Dutch government's barring Ankara officials from speaking to voters about an upcoming Turkish referendum on April 16 represented a straying from democracy akin to “Nazi practices.”

Wilders called those who rioted outside the Turkish consulate in Rotterdam last weekend “scum.”

While one opinion poll indicated that Wilder’s comments regarding the Turkish protesters would help him win Wednesday’s election, other polls suggested Rutte’s hard lined stance on the political rallies in the first place would give him a boost in the polls, BBC News reported Wednesday.

The Dutch population reportedly grew by roughly 79,000 people to a total of 16.9 million in 2015, after 203,000 immigrants moved to the Netherlands that year. Immigrants, most of who fled dire poverty amid violent Civil Wars in the Middle East, have a choice of whether or not to register as part of the Dutch population after they are granted a residency permit, or if they had been living in an asylum center there for more than six months. Roughly 21,000 Syrians, 3000 Eritreans and 2000 Ethiopians were added to the Netherlands' population in 2015, with the rest mostly hailing from Poland.