Dutch anti-Islam political leader Geert Wilders has been convicted of insulting a group and inciting discrimination.
But no penalty was imposed by the court near Amsterdam on Wilders, whose party is leading in polls ahead of parliamentary elections in March.
Wilders was also acquitted of inciting hate over telling supporters in March 2014 he would ensure there were fewer Moroccans in the Netherlands.
He called the guilty verdict "madness" in a tweet posted a short time later.
He said he would appeal.
The three-week trial was triggered when police received 6,400 complaints about remarks Wilders made during a municipal election campaign in The Hague.
At a rally, he asked supporters whether they wanted "fewer or more Moroccans in your city and in the Netherlands".
When the crowd shouted back "Fewer! Fewer!" a smiling Wilders responded: "We're going to take care of that."
At the trial, prosecutors took testimony from Dutch-Moroccans who said his comments made them feel like "third-rate citizens".
Wilders in the spotlight - Anna Holligan, BBC News, Schiphol
This guilty verdict will do little to damage Geert Wilders' political aspirations.
In fact, the trial has provided the populist leader with the two vital elements upon which his party thrives - a platform to promote his political message and masses of media attention. In court he repeated warnings about the dangers of Islam and immigration.
Many supporters see this trial as reaffirming their belief that Wilders is a courageous leader prepared to stand up for them and address the issues a politically correct elite is afraid to talk about. They have been emboldened by populist victories in the UK and US. Wilders' Freedom Party (PVV) is currently 10 percentage points ahead of the ruling liberal party in the polls.
In response to the guilty verdict, Mr Wilders accused the judges of convicting "half of the Netherlands" - a reference to research commissioned by the PVV which found 43% of the Dutch public believe the country has a problem with Moroccans.
European speech laws: Key cases
- Dieudonné M'bala M'bala, a controversial French comedian regarded by many as anti-Semitic, has been condemned many times over the past 10 years for hate speech, Holocaust denial and "praising terrorism". Some of his shows have been banned by officials.
- In 2006, an Austrian court sentenced controversial British historian David Irving to three years in jail for Holocaust denial, over a speech and interview he gave in 1989 in which he called for an end to the "gas chambers fairy tale".
- In October 2016, German prosecutors dropped a case against comedian Jan Boehmermann on charges of insulting Turkish President Recep Tayyip Erdogan in a satirical poem filled with profanities and allusions to bestiality and child sex abuse.
- French far-right leader Jean-Marie Le Pen was condemned to a heavy fine for calling the Holocaust "a detail of history", in a 1987 interview. In 2008, he was given a three-month suspended sentence for saying the Nazi occupation of France had not been "particularly inhumane".
- In 2015 Marine Le Pen, daughter and successor of Mr Le Pen as leader of the National Front party, was acquitted of inciting hatred after she compared Muslim street prayer to the Nazi occupation.
Wilders had argued his comments should be protected by his right to freedom of speech.
But judges at the court in Schiphol ruled that there were limits and that this right could not be used to limit the freedom of others - in this case, a minority group.
"If a politician crosses the line, that doesn't mean free speech is being restricted," said Presiding Judge Hendrik Steenhuis. "A crime cannot be protected by the right to free speech."
The verdict suggests that, in effect, Wilders and his party staged a stunt. Judges found evidence that they planned the remarks in advance and coached the supporters on how to respond.
He had intended to insult, they said.
The judges described it as an "extraordinary case" because Wilders was the leader of a political party and had a duty not to polarise society.
They said the conviction was punishment enough and that there would be no jail sentence or fine, as the prosecution had requested.
Wilders was previously prosecuted in 2011, over anti-Islam comments such as comparing the religion to Nazism and calling for a ban on the Koran. He was acquitted and the case was widely seen as giving the populist leader a publicity boost.