Dutch PM Mark Rutte has warned his country not to succumb to a "domino effect" of populism that he linked to Brexit and to Donald Trump's election.
Mr Rutte was taking on his main rival, the controversial populist Geert Wilders, in a TV debate ahead of Wednesday's election.
Mr Wilders has pledged to take the Netherlands out of the EU, close all mosques and ban the Koran.
Some opinion polls suggest his Freedom Party could win the most seats.
That would hand him the first run at forming a coalition government, but the other parties contesting the election have ruled out working with the Freedom Party, making that an unlikely scenario.
- Why Dutch populist Geert Wilders is scenting victory
- Are Dutch voters really turning to Wilders?
Monday's televised debate was the first head-to-head between the two frontrunners, after Mr Wilders refused to take part in several previous debates.
The two men clashed over a recent diplomatic spat with Turkey, which followed Mr Rutte's decision to ban two Turkish ministers from addressing rallies in the country. In response, Turkish President Recep Tayyip Erdogan accused the Netherlands of being "Nazi remnants".
Mr Wilders said at the debate that Mr Rutte should have immediately expelled the Turkish ambassador. "Otherwise we accept that we are being insulted and our police are being insulted too," he said.
Mr Rutte's reply - that the remark showed the difference between "tweeting from the sofa and governing the country" - won him a sustained round of applause.Media captionA look at how tensions between Turkey and the Netherlands unfolded
With two days to go until the election, one poll cited by Reuters suggested the Turkey spat, and subsequent riots by ethnic Turks in Rotterdam, had given anti-immigrant parties a boost.
The poll put the Freedom Party in second place behind Mr Rutte's VVD party. General polls suggest a significant number of Dutch voters are yet to make up their minds, meaning the debate could carry weight.
Mr Wilders does not shy away from controversy. He has vowed to ban Muslim immigration, shut mosques, and tax women who wear the Muslim headscarf, and in February he said some Moroccans were "scum".
Two months ago he was convicted of hate speech in a trial over a promise to reduce the number of Moroccans in the country.
Mr Wilders is highly unlikely to be able to form a government and so become leader, but a win for his party would be significant in the first European general election since Mr Trump became president in the US.
It would also foreshadow next month's presidential election in France, where far-right, anti-EU contender Marine Le Pen has widespread support, and September's election in Germany, where another right-wing party, Alternative for Germany, is likely to win seats for the first time.