Dutch anti-Islam politician Geert Wilders has told a court that his trial for alleged hate speech is a "charade, a disgrace for the Netherlands, a mockery for our society".
In a televised statement on the last day of the trial, he said that if he was convicted "millions of Dutch citizens will be convicted with me".
The charges were brought after he led a chant for fewer Moroccans in the Netherlands at a rally 18 months ago.
He denies inciting racial hatred.
Mr Wilders has denounced the trial as an attempt to suppress freedom of speech. If convicted, he faces a fine and a year in prison. The verdict is due next month.
The populist politician, who had previously refused to attend the trial, addressed a three-judge bench at a high-security courthouse near Amsterdam's Schiphol airport.
In a long speech, he portrayed himself as part of a growing anti-establishment movement that had resulted in the UK's vote to leave the European Union and Donald Trump's victory in the US presidential election.
"Worldwide, a movement has started that is making short shrift of the politically correct doctrines of the elite and their subordinate media," he said.
"Brexit proved it. The American election proved it."
He said that neither he nor his supporters were racist.
"They are people who want their country back and who are sick and tired of not being listened to," he said.
"If you convict me you will convict half of the Netherlands. Many Dutch will then lose the last bit of trust in the rule of law."
Mr Wilders has repeatedly criticised Islam, calling for the Koran to be banned and for the closure of all mosques in the Netherlands.
But prosecutors say he crossed a line when he asked supporters if they wanted "fewer or more Moroccans" in the Netherlands.
After supporters chanted back "fewer", he replied: "We'll organise that."
In 2011, Mr Wilders was acquitted of incitement after being accused of encouraging hatred towards Muslims.
The Netherlands will hold a general election in March and some opinion polls suggest Mr Wilders' Freedom Party (PVV) is a close second behind Prime Minister Mark Rutte's liberal VVD, or even slightly ahead.