A Dutch right-wing politician who celebrated the strong performance of his xenophobe party at local elections with an anti-Moroccan chant is to be sued by representatives of the Dutch-Moroccan community.

Geert Wilders, 50, asked supporters of his populist Freedom Party (PVV) whether they wanted "more or fewer" Moroccans in the Netherlands at a party gathering after municipal elections in The Hague.

"Fewer! Fewer! Fewer!" his supporters chanted back before breaking into a rumbling applause. "Good, we're going to take care of that," Wilders said.

The Grouping of Dutch-Moroccans Foundation (SMN) said it was to take legal action against the silver-haired politician.

"Today we are meeting police where we'll file a discrimination-based complaint against Wilders," Habib el Kaddouri, a coordinator for SMN, told AFP. "We believe by targeting a specific group, Wilders this time has gone too far."

In 2011 Wilders was cleared from charges of inciting hatred and discrimination against Muslims over anti-Islam remarks, for they targeted a religion rather than a particular ethnic group.

Ahmed Charifi, chairman of the Association for Dutch Moroccans, told Reuters Wilders reminded him of Adolf Hitler.

"It raises images of a man in the 1930s with a moustache in front of a microphone," Charifi said.

Conservative Prime Minister Mark Rutte said he had a "dirty taste" in his mouth over Wilders' attack on the Moroccan community.

"All those people in the country who want to make a positive contribution, I do not care where they come from. All that matters is their future," Rutte said.

PVV, which polls at about 20% across the Netherlands, won the vote in Almere, east of Amsterdam, and came second in The Hague.

The vote saw the Netherlands' centrist ruling coalition suffer major losses to the benefit of the centrist D-66 party, which took Amsterdam, and PVV.

Wilders' anti-immigration party is expected to confirm its strong performance at the EU parliamentary elections in May. PVV has struck a right-wing anti-EU alliance with France's National Front (FN).