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

The suspect, a 43-year-old German identified as Tobias Rathjen, 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.

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 Rathjen had “a very deeply racist attitude”.

Tributes left near the Midnight shisha bar in Hanau. Photograph: Thomas Lohnes/Getty Images

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

Chancellor Angela Merkel condemned the “poison” of racism, as anger mixed with grief over the deadliest attack linked to Germany’s extreme right in recent months.

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.

Mourners place candles and flowers at the Unity Memorial at St Paul’s church in Frankfurt am Main. Photograph: Maximilian von Lachner/EPA

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.

As condemnation of the Hanau attack 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.

On Friday last week, 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 Christchurch in New Zealand last year.