A Dutch court convicted populist lawmaker Geert Wilders -- who is running to be prime minister -- of hate speech Friday, at the end of a trial he branded a politically motivated "charade" that endangered freedom of speech.

Presiding Judge Hendrik Steenhuis said the court would not impose a sentence because the conviction was punishment enough for a democratically elected lawmaker. Prosecutors had asked judges to fine him $5,300.

The politically charged prosecution centered on comments Wilders made before and after the Dutch municipal elections in 2014. At one meeting in a Hague cafe, he asked supporters whether they wanted more or fewer Moroccans in the Netherlands. That sparked a chant of "Fewer! Fewer! Fewer!" — to which he replied, "we'll take care of it."

Prosecutors say that Wilders, who in 2011 was acquitted at another hate speech trial for his outspoken criticism of Islam, overstepped the limits of free speech by specifically targeting Moroccans.

On Friday, he was convicted for the interaction with the crowd of supporters in the Hague cafe, which judges said was carefully orchestrated and broadcast on national television. He was acquitted for similar comments he made in a radio interview a week earlier.

In a tweet, Wilders called the verdicts "madness" and said that he had been convicted by three judges who hated his Party for Freedom.

Wilders was not in court for the verdict that came just over three months before national elections. Wilders' party is currently narrowly leading a nationwide poll of polls and has risen in popularity during the trial.

Even before the hearing, Wilders vowed not to let a conviction muzzle him.

"Whatever the verdict, I will continue to speak the truth about the Moroccan problem, and no judge, politician or terrorist will stop me," he tweeted shortly before the verdict.

He had denied the charges and insisted he was performing his duty as a political leader by pointing out a problem in society.

Before declaring Wilders guilty, Steenhuis stressed that freedom of speech was not on trial as Wilders had claimed during the case.

"Freedom of speech is one of the foundations of our democratic society," the judge said. But he added: "Freedom of speech can be limited, for example to protect the rights and freedoms of others, and that is what this case is about."

The Associated Press contributed to this report.

