The investigation into a deadly gun attack in Hanau is focusing on whether others knew about or helped organise it, Germany's federal prosecutor says.
The suspect shot dead nine people "of migrant background" at two shisha bars on Wednesday evening local time. He and his mother were later found dead in his flat.
Peter Frank said material the suspect Tobias R had posted online showed a "deeply racist mindset".
He had also been influenced by conspiracy theories, Frank said.
Earlier Chancellor Angela Merkel said there were many signs Tobias R, 43, had acted out of racism.
Speaking in Berlin, Merkel said: "Racism is a poison. Hate is a poison and this poison exists in our society and is already to blame for many crimes."
Turkey says at least five of the dead were Turkish citizens. President Recep Tayyip Erdogan said he expected Germany to "throw light on all aspects" of the attack.
Frank said six people had also been injured in the attack, one of them seriously.
Shortly after the attacks the suspect and his 72-year-old mother were found in his apartment, both also shot. A gun was found next to the suspect's body.
Frank said investigators wanted to establish any links the suspect may have had in Germany or potentially also abroad.
Der Bekannte meines Cousins wurde gestern in #Hanau ermordet. Freunde & Cousins trauern mit diesem Foto... Wir können nicht draußen einen friedlichen Abend verbringen, haben Angst um unsere Leben. Was passiert gerade in Deutschland? Wo ist der Schutz? Verdammter #rechterTerror pic.twitter.com/bKLcFzplaL— Ali Can (@alicanglobal) February 20, 2020
"My sympathies to the loved ones of the victims. I wish the injured a swift recovery. It is a day that will live long in our memory and will motivate our investigations," Frank said at a short news conference.
The shootings took place around 10pm on Wednesday (local time), and the first target was the Midnight shisha bar in the city centre of Hanau. Witnesses reported hearing about a dozen gunshots.
The suspect then travelled by car to the Kesselstadt neighbourhood, some 2.5km away and opened fire at the Arena Bar & Cafe.
Shisha bars are places where people gather to smoke a pipe known as shisha or hookah. Traditionally found in Middle Eastern and Asian countries, they are also popular in many other parts of the world.
The shootings sparked a manhunt. Police identified the gunman through information from witnesses and surveillance cameras. Early on Thursday, they stormed the suspect's home, near the scene of the second shooting.
Hanau, in Hesse state, is a city of 100,000 residents about 25km east of Frankfurt.
Victims Germans and foreigners
The victims included German citizens and foreigners aged between 21 and 44, Germany's federal prosecutor said.
Among the dead were "several victims of Kurdish origin", the Kon-Med association of Kurds in Germany said, adding that it was "furious" the authorities were not doing more to fight extremism.
A Bosnian and a Bulgarian also died in the attack, those countries' foreign ministries said.
Ali Can, a German-Turkish anti-racism activist, posted a photo of a friend of his cousin, saying that the friend was among those killed.
Writing on Twitter he said: "We can't spend a peaceful evening out, we're scared for our lives. What is happening in Germany? Where is the protection?"
Tobias R had posted videos and a kind of manifesto on his website, Frank said.
In the manifesto he wrote that people from more than 20 countries, including Turkey and Israel, should be "destroyed", AFP reported.
London-based German counter-terrorism expert Peter Neumann said the text contained "various, but mostly extreme right views, with a do-it-yourself ideology cobbled together out of parts found on the internet".
In her statement, Merkel said there were "many indications at the moment that the perpetrator acted on right-wing extremist, racist motives, out of hatred towards people of other origins, religion or appearance".
Not previously known
Hesse state Interior Minister Peter Beuth said the suspect had not previously been known to the authorities.
The Bild tabloid reports he had a firearms licence, and that ammunition and gun magazines were found in his car.
Gun laws in Germany are among the most stringent in the world, and were tightened further in recent years after other mass shootings.
Hanau Mayor Claus Kaminsky said it had been the "hardest day in our history". He said the city had seen centuries of peaceful coexistence between different faiths and cultures - "That is why it is so hard to understand".
Hesse state leader Volker Bouffier said the state parliament had travelled to Hanau to show its solidarity with the victims and their families. He said the attack "came out of a climate" that existed "to some degree worldwide" in which people are targeted because they are different.
"We will do everything to show that people don't have to be afraid and show them that they belong with us, " he said.
However, the co-leader of the far right AfD party said the attack was "neither right nor left-wing terrorism" but the actions of "a madman". Politicians from the rest of political spectrum accused the expressly anti-Islam and anti-immigration AfD of stirring up anti-foreigner hatred.
German Defence Minister Annegret Kramp-Karrenbauer: "The background must now be clarified further. Violence from right-wing extremists must not let us rest, we must stand against it".
Ursula von der Leyen, European Commission President and former German government minister, said: "I am deeply shocked by the tragedy that took place... in Hanau".
Germany's Muslim association KRM called for more to be done in the fight against right-wing extremism, saying they had requested for months that needed to be "a clear stand against Islamophobia".