Dutch far-right Party for Freedom (PVV) leader Geert Wilders answers questions during a Reuters interview in Budapest, Hungary, June 24, 2016, after Britain voted to leave the European Union in the EU BREXIT referendum. REUTERS/Laszlo Balogh

By Toby Sterling

THE HAGUE (Reuters) - Anti-Islam politician Geert Wilders can be tried on charges of inciting racial hatred, a court in The Hague ruled on Friday, setting the stage for a politically charged test of freedom of speech laws in the Netherlands.

Judge Hendrik Steenhuis dismissed Wilders' lawyers arguments that he was being singled out, saying prosecutors have broad leeway in determining when they think someone has crossed the line from offensive speech to discriminatory speech.

Wilders is accused of discrimination and inciting racism for remarks in 2014, televised live, in which he led a roomful of followers in chanting that they wanted "fewer" Moroccans in the Netherlands.

Steenhuis set the start date for the three-week trial on Oct. 31, meaning a verdict would be likely in December - well ahead of national elections in March.

Wilders' far-right Freedom Party is neck-and-neck with Prime Minister Mark Rutte's ruling conservative VVD Party in popularity polls.

Wilders response to the ruling was that he was being "prosecuted for what millions (of Dutch people) think."

Via Twitter he also indicated he thinks the process against him is politically motivated.

In 2011, he was acquitted of inciting racial hatred charges for calling for the Koran to be banned and for the deportation of "criminal" Moroccans. Judges said that his remarks, while offensive to some, were within the bounds of legitimate political discourse.

Many observers felt the trial helped increase his popularity as he was able to showcase himself as a champion of free speech.

(Additional reporting by Anthony Deutsch; Editing by Louise Ireland)