But the court found him not guilty of incitement to hatred and handed down no punishment.
Wilders, the leader of the Party for Freedom (PVV), was charged after inciting supporters into a chant calling for fewer Moroccans in the Netherlands in 2014.
According to a court statement, Wilders asked his audience: "Do you want more or less Moroccans in this city and in the Netherlands?"
The court said that Wilders "singled out an entire group of citizens" and that the message "came through loud and clear." It convicted him of insulting a group and incitement to discrimination.
But the court found insufficient evidence to find him guilty of incitement to hatred.
The court, which could have fined Wilders, decided that verdicts were sufficient punishment and imposed no further penalty.
"Three PVV-hating judges just declared Moroccans a race and convicted me, as well as half of the Dutch population," Wilders tweeted shortly after the ruling.
Wilders said in a Twitter post ahead of the verdict Friday morning that he will "continue to speak the truth about the Moroccan problem."
"No judge, politician or terrorist will stop me," he added.
Wilders has previously called
Islamic immigration "an invasion" that will "replace our people" and "erase our culture."
Among his other policies, Wilders has called for a referendum on the Netherlands' membership in the European Union, and a full burqa ban.
Wilders, 53, came to international attention in 2008 with the provocative online film "Fitna,"
which juxtaposed the aftermath of terrorist attacks with verses from the Quran.
Known as much for his anti-Muslim views as his bleached hair, Wilders has been called "Europe's Donald Trump" -- with his party gaining popularity in recent years.
It's not the first time Wilders has appeared in court on hate speech charges.
In 2011 he was acquitted of inciting hatred against Muslims
, after calling for the Quran to be banned in the Netherlands.
Dutch election on the horizon
Friday's verdict comes three months ahead of the country's parliamentary election in March, when Wilders will be vying for the top job of prime minister.
The opposition party leader will face current prime minister Mark Rutte, whose conservative People's Party for Freedom and Democracy (VVD) rules in a coalition with the the Labour Party (PvdA).
Rutte said at a press conference Friday that neither he nor his party would be willing to govern with Wilders unless he retracted his comments about Moroccans.
Wilders has run on a party manifesto focused on a so-called "de-Islamification" of the Netherlands
, in which he lays out an 11-point plan pledging, among other things, to shut down all the country's Islamic schools and close the borders to migrants from Islamic nations.