AFP — Germany’s president Joachim Gauck has the right to call members of a neo-Nazi party “loonies,” the country’s top court ruled Tuesday.

The Federal Constitutional Court dismissed a complaint by the far-right, anti-immigrant National Democratic Party of Germany (NPD) against the remark last August by the largely ceremonial head of state.

The fringe party had argued that the president, whose job is to serve as a kind of national moral arbiter and represent Germany abroad, is supposed to stay neutral on day-to-day party politics.

But the court in its ruling gave the president a wide berth for how he performs his functions and what issues he chooses to address.

“Specific statements by the Federal President can only be objected to before the courts if the Federal President takes sides in a way that clearly neglects the integrative task of his office, and thus takes sides in an arbitrary manner,” it said in a statement.

“This was not the case here.”

The president made the comment to students after the NPD helped organize protests against a refugee center that had opened in eastern Berlin.

Gauck, once a Christian pro-democracy activist in communist East Germany, said: “We need citizens who rally in the streets and put these loonies in their place.”

The court acknowledged that the term “loonies” could be seen as defamatory.

“Here, however, as follows from the overall style of the respondent’s statements, the term ‘loonies,’ in addition to the terms ‘ideologues’ and ‘fanatics,’ serves as a collective term for people who have not learned the lessons of history and who, unimpressed by the dreadful consequences of National Socialism, hold nationalist and anti-democratic opinions,” it said.

The court said Gauck was calling on his audience to recognize the legacy of “the tyrannical rule of National Socialism” to fight “political views which, in his opinion, pose dangers to the free democratic basic order and which, in his view, the applicant advocates”.

Gauck said he was “grateful” for the “clarity” provided by the court’s ruling, according to an aide, David Gill, quoted by German news agency DPA.

The NPD slammed the decision as “grotesque,” saying it divided the German citizenry into unequal “classes of people.”

The party, with around 6,000 members, scored just 1.3 percent in national elections last September and has never entered parliament.

However, it is represented in two eastern states’ legislatures and therefore is entitled to official campaign funding under German electoral law.

And last month it gained its first seat in the European Parliament after garnering 1.0 percent of the national vote.

Germany’s upper house of parliament is working on a case before the constitutional court to ban the NPD, which was founded in 1964 as a successor to the neo-fascist German Reich Party.

Chancellor Angela Merkel’s spokesman has labelled the group an “anti-democratic, xenophobic, anti-Semitic, anti-constitutional party”.

And the Federal Office for the Protection of the Constitution, a domestic security watchdog, has the party under observation.