The far-right Alternative for Germany (AfD) party is officially suspected of extremism, a German court has ruled.
The move, which upholds a lower-court ruling the party had challenged, means intelligence services can continue to monitor AfD activities and communications.
The party was founded in 2013 as a Eurosceptic group objecting to German-backed EU bailouts for southern Europe.
But as refugee numbers rose after 2015, the AfD morphed into a strident, ever-more radical anti-migration force.
Today influential blocs within the AfD hold ethno-nationalist beliefs that define anyone with a migrant heritage as not "properly German" - even if they hold German citizenship.
Because of Germany's experience of dictatorship and oppression in the 20th Century, there are high legal hurdles to state surveillance of any political party.
But on Monday the court in Münster ruled that there was reason to believe that "at least a significant part of the AfD" aimed to "grant German citizens with a migration background only a legally devalued status".
In other words, the court suspects large parts of the AfD of wanting to create a two-tier society, where people judged to be "ethnically German" would have more rights than people whose families originally came from abroad.
This, according to the German constitution, would be illegal discrimination.
Monday's court decision is a blow for the AfD, but the German government sees it as a victory. "Today's ruling shows that we are a democracy that can be defended," said Interior Minister Nancy Faeser.
It shows that the German state has the tools needed to protect democracy from threats from within, she added.
The AfD denies that it is anti-democratic. Party leaders reject the ruling, accusing the judges of not providing enough evidence for their decision.
Lawyers for the AfD have said they will appeal against this ruling. But any further challenge can only focus on procedural problems, not the legal content of today's decision.
The AfD has been slipping recently in polls from the low-20s earlier this year to around 16%.
This is possibly partly because of mass anti-AfD protests across the country after it was revealed that party officials had attended a secret meeting where the deportation of people with non-German heritage was discussed.
A numbers of scandals over alleged spying for China and suspected links to the Kremlin have also dented support.
Arguably a bigger problem for the AfD is that other right-wing parties are eating into their poll numbers.
New insurgent parties peddle a similar anti-migrant message and some mainstream conservatives are sounding increasingly radical when it comes to asylum seekers, in some cases even pushing for a UK-style Rwanda scheme.
The ruling could simply boost the far-right's support among core voters of the AfD, who tap into a narrative of victimisation and believe the party is being targeted by mainstream Germany.
But AfD leaders are rattled by such cases. While the party has become more radical over the years, its leaders are at the same time trying to detoxify the brand to appeal to undecided voters.
In rural parts of eastern Germany, the AfD is already a dominant force in some councils, sometimes even co-operating with other parties on grassroots local issues.
But on a regional and national level, no other party will work with the AfD to form coalitions, so until now it has been shut out of real political power.
This is why upcoming regional elections in three large eastern German states in September are so important.
The AfD comes first in polls in some regions and in the short term wants to enter a regional governing coalition. In the long term its aim is to enter national government.
Announcements such as Monday's ruling make that more difficult - not only by putting off moderate voters, but also by firing up the debate about banning the AfD altogether.
For years discussions about a ban have surfaced regularly. Critics of the idea say that would simply play into the AfD's hands by boosting its narrative of victimisation.
Legally it would also be difficult, time-consuming and possibly be rejected by the constitutional court.
But with each new scandal involving the AfD, calls grow louder from all mainstream parties to investigate whether there are at least sufficient grounds to try.