Such a dilemma would have been unthinkable here a decade ago, when the Netherlands was as renowned for the dull, consensual predictability of its politics, as for its profusion of canals.

But the 2002 assassination of Mr. Fortuyn by an animal rights activist convulsed the country. Two years later, after making a documentary fiercely critical of Islam, Theo Van Gogh, was also killed in broad daylight.

Dick Houtman, a professor of political sociology at Erasmus University in Rotterdam, said that Mr. Wilders had built on Mr. Fortuyn’s legacy, successfully avoiding the overtly racist language of far-right politicians in other countries by highlighting issues like freedom of speech, female equality and gay rights.

“That serves to exclude Muslims from the Dutch political consensus,” he said.

His rise filled the void left by the erosion of traditional party allegiances, which often bound voters by religious affiliation rather than class, Professor Houtman said. “It’s a massive change to the Dutch political landscape and I don’t think it will go away quickly,” he added.

Even in a campaign dominated by the economy, the populist right managed to claim a one-sixth of the parliamentary seats. Political opponents like Henk Nijhof, president of the GroenLinks party, concede that it can now normally expect to claim 20 to 25 seats in Parliament. “I am a bit ashamed of what is happening in my country,” he added as he sipped a beer to celebrate his party’s results.

Most of the big, traditional, parties were, by contrast, rebuffed by a disgruntled and divided electorate. So splintered is political support that the construction of a coherent and durable coalition will be an uphill task for the leader of the Liberals, Mark Rutte.

Against a difficult economic background Dutch voters appeared to accept the need for austerity advocated to varying degrees by the different parties.