By Madeline Chambers and Ursula Knapp
BERLIN/KARLSRUHE (Reuters) - Germany's Constitutional Court on Tuesday said the far-right National Democratic Party (NPD) resembled Adolf Hitler's Nazi party, but ruled against banning it because it was too weak to endanger democracy.
Germany's 16 federal states had pressed for the ban amid rising support for right-wing groups that has been stoked by popular resentment over the influx of large numbers of migrants.
Critics, including Jewish groups, condemned the court ruling, saying it sent a signal that legitimized the spread of hatred.
While the court said the NPD's aims, viewed by Germany's intelligence agency as racist, anti-Semitic and revisionist, violated the constitution, it said there was insufficient evidence that it could succeed and this made a ban impossible.
"The NPD intends to replace the existing constitutional system with an authoritarian national state that adheres to the idea of an ethnically defined 'people's community'," the court said.
"However, currently there is a lack of specific and weighty indications suggesting that this endeavor will be successful."
In the countdown to German federal elections in September, the NPD has been eclipsed on the right end of the political spectrum by the anti-immigrant Alternative for Germany (AfD) - which has seen support jump as high as 15 percent in opinion polls - and it has failed to capitalize on the refugee crisis.
The court said it looked "completely impossible" for the NPD to achieve its aims by parliamentary or other democratic means.
The NPD has never won enough support to win seats in the federal parliament and in September lost its last seat in a regional assembly. However, it is represented on local councils and in 2014 won a seat in the European Parliament.
Welcoming Tuesday's ruling, the NPD said it would now rebuild.
"The stain has gone, the party is not banned, now we can start again politically," said NPD leader Frank Franz.
The tough criteria for outlawing a political party in Germany is in part a legacy of the crushing of dissent in the Nazi era and communist East Germany. Only two parties have been banned since World War Two - the Socialist Reich Party, a successor to the Nazis, in 1952, and the Communist Party in 1956 in West Germany.
Germany's domestic intelligence agency says the NPD, established in 1964, has about 5,000 members and links to some violent neo-Nazis.
Several senior NPD figures have been convicted of Holocaust denial or incitement - its European lawmaker Udo Voigt has described Hitler as a "great German statesman" - but the party denies any involvement in violence.
"Identification with leading personalities of the (Nazi) party, the use of selected National Socialist vocabulary, texts, songs and symbols, as well as revisionist statements with regard to history demonstrate an affinity ... with the mindset of National Socialism," said the court.
The International Auschwitz Committee said the ruling sent a "fatal signal to Europe where right-wing extremism overlaps with right-wing populists and tries to turn people's fears and insecurities into hatred and aggression".
The former head of Germany's Central Council of Jews, Charlotte Knobloch, said the country's history and current strength of right-wing populism had made it crucial to outlaw the NPD.
Others argued a ban would not change people's minds.
"Now we must concertedly fight right-wing extremism ... in people's heads. The discussion about a ban will no longer distract us," said Greens lawmaker Volker Beck.
An earlier attempt to ban the NPD in 2003 collapsed because some of the party officials used as witnesses turned out to be government-paid informants.
German states started pursuing a ban after the discovery in 2011 of a neo-Nazi cell, the National Socialist Underground (NSU), blamed for killing nine immigrants and a police woman between 2000 and 2007.
(Writing by Madeline Chambers; editing by Richard Lough and Gareth Jones)