A right-wing extremist who shot dead nine people in two shisha cafes during a rampage through a city in south-west Germany left a rambling letter in which he expressed his hatred of foreigners.
The shootings provoked a five-hour manhunt before the killer and his mother, 72, were found dead at a nearby house in the city of Hanau.
He has been identified in German media as bank official Tobias Rathjen, 43.
On Wednesday evening, thousands of people gathered in the Marktplatz in Hanau, about 30 kilometres from Frankfurt, to pay tribute to those killed.
Carrying large banners and images of their lost loved ones, families of the victims marched through the square.
One woman tearfully told The National that her uncle had been killed at one of the cafes.
"We have lost my uncle. He was 35," she said. "We have all come tonight to light a candle and remember him and those who were killed alongside him."
Many people travelled hundreds of kilometres to march in solidarity with the families.
Earlier in the day police said they were treating the incident as a suspected terror attack.
"A first analysis of the suspected culprit’s home page points to a xenophobic motive,” said Peter Beuth, Interior Minister in the regional Hesse government said.
“I condemn this act in the strongest possible terms. It is an attack on our free and peaceful society."
Just days before the killings, Rathjen posted a video on YouTube containing conspiracy theories.
Prosecutors say videos and a 24-page letter, suggesting that people from dozens of countries should be "destroyed", were found at his home.
Neighbours told The National that Rathjen's parents owned the home where his body was found and that he had been living in Bavaria.
"I have lived here 20 years and we have never seen him here. He grew up here but had moved away," one neighbour said.
"We only ever saw his parents. We are all very shocked by what has happened. I came home to see all the police."
Police have cordoned off the street around the home. Cars owned by the family were taken away for further investigation.
All nine people killed were of foreign backgrounds and aged between 21 and 44.
Six people were injured, one seriously. One of the victims was a pregnant mother of two, aged 35, Bild newspaper reported.
Among the dead were "several victims of Kurdish origin", the Kon-Med association of Kurds in Germany said.
The association said it was "furious" that authorities weren't doing more to battle rising extremism.
Turkish President Recep Tayyip Erdogan called it a “heinous attack” and expressed confidence that German authorities "will exert all kinds of effort to shed light on all aspects”.
German Chancellor Angela Merkel said in Berlin that all indications were he acted out of far-right extremist and racist motives.
"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," Mrs Merkel said.
Rathjen's writings envision a “rough cleaning” and then a “fine cleaning” of certain cultures, which could halve the world's population.
“The following people must be completely exterminated: Morocco, Algeria, Tunisia, Libya, Egypt, Israel, Syria, Jordan, Lebanon, the complete Arabian Peninsula, Turkey, Iraq, Iran, Kazakhstan, Turkmenistan, Uzbekistan, India, Pakistan, Afghanistan, Bangladesh, Vietnam, Laos, Cambodia and the Philippines.”
King's College London's counter-terrorism expert, Peter Neumann, said the letter 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," Mr Neumann said. "He hates foreigners and non-whites.
"Although he doesn't emphasise Islam, he calls for the extermination of various countries in North Africa, Middle East and Central Asia."
The attack comes less than a week after German police arrested 12 people accused of preparing attacks on mosques to try to stoke civil strife in Germany.
A memorial service is due to be held on Wednesday where officials will lay wreaths.
The first attack in Hanau occurred in the centre of the city about 10pm local time, police said.
Three people were killed in front of the building, with witnesses hearing a dozen shots.
The attacker fled the scene by car and shortly afterwards there was a second shooting at another cafe.
The gunman reportedly rang the doorbell and shot people in the smoking area, killing five people including a woman. The victims were believed to be of Kurdish origin.
Police said one of those injured in the attack had also died, taking the death toll to nine.
"The victims are people we have known for years," the bar manager's son told DPA news agency.
Two employees were among the victims, said the man, who was not at the bar during the shooting.
"It is a shock for everyone," he said.
Many people had been watching the Champions League game between German club RB Leipzig and English rivals Tottenham at the time of the incident.
Can-Luca Frisenna, whose father and brother run one of the two bars attacked, said he rushed there after learning about the shooting.
"I heard my father was affected and my little brother. They run the kiosk, I don't have much to do with it," Mr Frisenna said.
"But then I saw them both. They were horrified and they were crying and everything. So everyone was shocked."
Claus Kaminsky, the Mayor of Hanau, said it had been "a terrible night".
"You could not imagine a worse night," Mr Kaminsky said. "It will of course keep us busy for a long, long time and remain a sad memory.
"I am deeply moved. Just the fact that eight people have lost their lives has shaken me up. But I ask all citizens not to speculate.
"The police must have the chance to clear up the situation and investigate. Until then we should wait with prudence, no matter how hard this may be."
Katja Leikert, an MP for the region, said it was "a real horror scenario".
"On this dreadful night for Hanau, I would like to express my deepest condolences to the relatives of those killed," Ms Leikert said. "I hope the injured will recover quickly."
There have been several extremist attacks in Germany in recent years, one of which killed 12 people in the heart of Berlin in December 2016.
But far-right attacks have become a particular concern for authorities.
In October, an anti-Semitic gun attack in the eastern city of Halle on the holy day of Yom Kippur underscored the rising threat of neo-Nazi violence. The rampage, in which two people were shot dead, was streamed live.
Last June conservative politician Walter Luebcke, an advocate of a liberal refugee policy, was shot at his home.
Hanau is also close to where a regional politician from Mrs Merkel’s CDU party was gunned down last year in a suspected right-wing slaying.
Known as the birthplace of the Brothers Grimm, Hanau has about 100,000 inhabitants from diverse ethnic backgrounds.