Thousands of people took part in vigils across Germany on Thursday after a gunman with apparent far-right beliefs killed nine people at a shisha bar and a cafe in the city of Hanau.

Chancellor Angela Merkel condemned the "poison" of racism, as anger mixed with grief over the latest and deadliest attack linked to Germany's extreme right in recent months.

People gathered in Hanau to pay their respects to the victims, bringing candles and roses / © AFP

The suspect, 43-year-old German Tobias R., was found dead at his home after the rampage along with his 72-year-old mother in what appeared to be a murder-suicide.

Hundreds of people, many carrying candles or a white rose, gathered in silence in Hanau in the evening to show solidarity with the victims.

Large crowds also gathered in Frankfurt and at Berlin's Brandenburg Gate, some carrying signs that read "Take racism personally" or "Never Again!", in scenes replicated across dozens of German cities.

- 'Deeply racist' -

The nine people killed at the two bars late Wednesday evening were aged between 21 and 44 and all had a "migrant background," although some were German citizens, chief federal prosecutor Peter Frank said.

He added that evidence, including video footage and a "manifesto" found on the suspect's website, showed Tobias R. had "a very deeply racist attitude".

The Turkish presidency said five Turkish nationals were among those killed.

Interior Minister Horst Seehofer was among top officials who visited the scene / © AFP

A Bulgarian and a Bosnian were also among the dead.

The Kon-Med association of Kurds in Germany said there were "several victims of Kurdish origin", and criticised German authorities for not taking a tougher stance against "far-right terrorism".

Speaking in Berlin, Merkel said: "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."

She recalled 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 as examples of the threat posed by the far right.

She also cited October's deadly anti-Semitic attack in Halle, which raised alarm over rising anti-Jewish hatred in Germany.

- 'Nazis Out!' -

Wednesday's rampage started at around 10:00 pm (2100 GMT) at the Midnight shisha bar in central Hanau, some 20 kilometres (12 miles) 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.

German President Frank-Walter Steinmeier and his wife Elke Buedenbender lay wreaths close to the crime scene in Hanau / © AFP

After a massive manhunt, the suspect was found dead at his flat, along with his mother. Both were killed by gunshot.

Prosecutor Frank said investigators were trying to determine if the suspect had accomplices, or contacts in Germany or abroad who might have known about the attack plans.

Relatives and friends of the victims gathered at the Arena bar on Thursday, an AFP reporter said, tearfully embracing one another.

"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.

German President Frank-Walter Steinmeier placed a wreath of white flowers outside the Arena bar on Thursday evening before addressing the main Hanau vigil.

Steinmeier, who serves as a moral compass for the nation, condemned the shooter's "brutal act of terror".

But he said he was heartened to see "thousands, maybe even tens of thousands" turning out across the country to honour the victims.

"We stand together, we want to live together and we show that over and over again. That is the strongest way to fight hatred," he said, to the occasional shout of "Nazis Out!" from the crowd.

Elsewhere, Frankfurt's Eintracht football team held a minute's silence ahead of its Europa League match against RB Salzburg.

- Growing threat -

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 that the text contained "various, but mostly extreme right views, with a do-it-yourself ideology cobbled together out of parts found on the internet".

The killings shook the city of Hanau, some 20 kilometres (12 miles) east of Frankfurt / © AFP

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.

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.