BERLIN — Germany’s highest court heard a case Tuesday on whether President Joachim Gauck was right to call a far-right anti immigrant group “loonies.”

The National Democratic Party of Germany (NPD) has taken its complaint against the comment by the largely ceremonial head of state to the constitutional court.

The fringe party argues that the president, whose job is to represent Germany at home and abroad, is supposed to stay neutral on day-to-day party politics.

Gauck made the comment to students last August when 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 NPD, with around 6,000 members, scored just 1.3 percent in national elections last September and has never entered the national parliament.

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

Germany’s upper house of parliament is working on a case before the constitutional court to ban the NPD.

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