Geert Wilders, the Dutch populist politician, who compared Islam with Naziism, has been acquitted by of hate speech and discrimination.

A Dutch court ruled on Thursday night his anti-Islam statements, while offensive to many Muslims, fell within the bounds of legitimate political debate.

Presiding judge Marcel van Oosten said Wilders' claims that Islam is violent by nature, and his calls to halt Muslim immigration and ban the Muslim holy book, the Quran, must be seen in a wider context of debate over immigration policy.

The court said that while Wilders’ rhetoric was at times on the edge of what is legal, his public statements could not be directly linked to increased discrimination against Dutch Muslims.

Defending, Wilders, who said the charges were politically-motivated, argued that his statements represent the views of millions of Dutch voters and are that he was protected by freedom of speech law.

The judge described Wilders’ statements about a "tsunami" of immigrants overrunning the country and threatening its culture as "crude and denigrating," but legally legitimate given the wider context and his further statements that he has no objections to Muslims who integrate and accept Dutch values.

Wilders, who lives under constant protection due to death threats, has never called for violence or endorsed it.

Wilders sat stone-faced while the judge read the ruling, but smiled broadly and shook hands with his lawyers after the verdict was announced. He waved to cheering supporters who hugged each other in the public gallery, and grinned as he left the courtroom.

Wilders, one of the most powerful and popular politicians in the Netherlands, was accused of inciting hatred and discrimination against Muslims through numerous public statements, and with insulting them by comparing Islam with Naziism.

"I'm incredibly happy with this acquittal on all counts," Wilders said outside the courtroom.

"It's not only an acquittal for me, but a victory for freedom of expression in the Netherlands. Fortunately you're allowed to discuss Islam in public debate and you're not muzzled… An enormous burden has fallen from my shoulders," he said.

Lawyer Ties Prakken, who represented some complainants, accused Dutch courts of failing to protect a religious minority from discrimination.

She said she was preparing an appeal to the U.N. Commission on Human Rights in Geneva.

In speeches and written articles, Wilder said Islam is an inherently violent religion, and he compared the Quran with "Mein Kampf," Hitler's tirade against Jews — an especially touchy image because of the large number of Dutch Jews handed over to the Nazis in World War II.

The court focussed on Wilders' 2008 film, ‘Fitna’ Arabic for ‘ordeal’ – a 15-minute series of verses from the Quran juxtaposed against news video of violence and terrorism. The film prompted angry demonstrations and official protests around the Muslim world.

"Given the film in its whole and the context of societal debate, the court finds that there is no question of inciting hate with the film Fitna," the judgment said.

Last April the same court acquitted Abdoulmouthalib Bouzerda, chairman of the Arab European League, of hate speech charges for publishing a cartoon on its website questioning the reality of the Holocaust.

The group had intended to spur public discussion about a perceived double standard: that European media are willing to publish cartoons mocking Islam's prophet Muhammad, while cartoons about the Holocaust are taboo.