Chancellor Angela Merkel condemned the "poison" of racism on Thursday after a shooter with suspected far-right beliefs killed nine people at a shisha bar and a cafe in the German city of Hanau.
All nine dead, aged between 21 and 44, had a "migrant background," although some were German citizens, chief federal prosecutor Peter Frank said.
Six others were injured, including one critically.
The suspect, identified as 43-year-old German Tobias R., was found dead at his home following an hours-long manhunt.
The body of his 72-year-old mother was also found at the flat in what appeared to be a murder-suicide.
Prosecutor Frank said evidence, including video and a 24-page "manifesto" found on the suspect's website, "shows a very deeply racist attitude".
"Racism is a poison, hatred is a poison and this poison exists in our society and it is already to blame for far too many crimes," Merkel said in Berlin.
Among the dead were "several victims of Kurdish origin", the Kon-Med association of Kurds in Germany said in a statement, adding that it was "furious" that authorities were not doing more to combat rising extremism.
Also killed were a Bosnian and a Bulgarian citizen, their respective foreign ministries said.
Tears and anger
The rampage started at around 22:00 on Wednesday at the Midnight shisha bar in central Hanau, some 20km east of Frankfurt.
The gunman reportedly rang the doorbell and then shot at people in the smoking section, mass-market daily Bild said.
He fled the scene by car before opening fire at the Arena Bar & Cafe, with witnesses reporting hearing a dozen shots.
Relatives and friends of the victims gathered at the Arena bar around midday Thursday, an AFP reporter said, tearfully embracing one another.
Police hurried to cover up the address of the perpetrator's website with a blue plastic sheet after it was spray-painted on a nearby wall.
"I couldn't be any more upset," said Inge Bank, 82, who lives near the bar.
"We have to nip it in the bud if the Nazi party is coming back," Bank said, adding that she had lived through World War II.
Interior Minister Horst Seehofer also visited the scene, laying flowers outside the Midnight bar.
He said interior ministers from Germany's 16 states would discuss later Thursday ways to improve security in light of the "very concerning" development in the extreme right scene.
The bar shootings sparked a massive manhunt, with police tracing the suspect's vehicle back to his home.
Special forces then stormed his apartment where they found him and his mother dead, killed by gunshot.
In a rambling 24-page document seen by AFP, the alleged gunman wrote that people from more than two dozen countries, including Turkey and Israel, should be "destroyed".
He also said he had never been with a woman, which he blamed on being "watched" by unspecified secret services.
King's College London counter-terrorism expert Peter Neumann tweeted of the text that it contained "various, but mostly extreme right views, with a do-it-yourself ideology cobbled together out of parts found on the internet".
"The pattern is clear, and not at all new," he added.
'You are not alone'
The bloodshed plunged Germany into mourning, and rallies are scheduled in Berlin, Hanau and other cities later on Thursday to honour the victims.
Frankfurt's Eintracht football team said it would hold a minute's silence ahead of its Europa League match against RB Salzburg.
German President Frank-Walter Steinmeier echoed Merkel in denouncing the "terrorist violence" in Hanau.
"I stand with all those who are threatened by racist hatred. You are not alone," he said.
Merkel pledged to fight back against "all those who try to divide Germany".
She cited the murders carried out by the neo-Nazi "NSU" cell between 2000-07 as well as last June's killing of pro-migrant politician Walter Luebcke, and the deadly anti-Semitic attack in Halle in October as examples of the threat posed by the far right.
German police have identified around 60 far-right adherents as "dangerous" individuals capable of carrying out a violent attack.
Last Friday, they arrested 12 members of a German extreme right group believed to have been plotting "shocking" large-scale attacks on mosques, similar to the ones carried out in New Zealand last year.
As condemnation of the Hanau violence poured in, the co-leader of the far-right AfD party Joerg Meuthen stood out by saying the shootings were "neither right- nor left-wing terrorism" but the actions of "a madman".
Politicians from across the political spectrum however accused the anti-Islam, anti-immigrant AfD of normalising hate speech and fomenting anti-foreigner sentiment in recent years.