The suspected gunman was later found dead in his Hanau flat. The suspect left behind a "manifesto" and videos that suggest the terror attack was motivated by "a hostile attitude to foreigners", interior minister for the state of Hesse said.
A 43-year-old German man shot and killed nine people at several locations in a Frankfurt suburb overnight in attacks that appear to have been motivated by far-right beliefs, officials said on Thursday.
The gunman first attacked a shisha bar in Hanau at about 2100 GMT on Wednesday, killing several people before heading about 2.5 kilometres (1.5 miles) west and opening fire again, claiming more victims.
At least five of the victims were Turkish citizens.
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.
Federal counter-terror prosecutors investigating the case said they saw "a xenophobic motive" behind the shootings, the latest deadly attack blamed on the far right in Germany.
Witnesses and surveillance videos of the suspect's getaway car led authorities quickly to his home, near the scene of the second attack, where he was found dead near his 72-year-old mother, said Peter Beuth, the interior minister for the state of Hesse, taking the overall death toll to at least 11.
What was the motive?
The suspect left behind online a "manifesto" and video material that suggested a terror attack motivated by "a hostile attitude to foreigners", Beuth said.
A website believed to be the suspect's is being evaluated, he added.
“Initial analysis of the webpage of the suspect indicate a xenophobic motivation,” Beuth 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," Chancellor Angela Merkel said in Berlin.
Centre-left Social Democratic Party's (SPD) leader Saskia Esken called it "right-wing terror in Germany" in a tweet. People have shied away for too long from calling it what it is, she wrote in German.
"A worse evening could not be imagined," Hanau Mayor Claus Kaminsky, also from SPD, told Bild.
Who was targeted?
Turkey's Ambassador to Germany Ali Kemal Aydin confirmed at least five Turkish citizens were killed in the attack.
“According to the initial information, it was an attack with a racist motive, but we would need to wait for the (official) statement,” Turkey's Foreign Minister Mevlut Cavusoglu said.
“Turkey expects German authorities to make maximum effort to enlighten the case,” Turkey’s Presidential Spokesman Ibrahim Kalin said on Twitter, calling racism a "collective cancer".
Among the dead were "several victims of Kurdish origin", an association of Kurds in Germany said in a statement, adding it was "furious" that authorities weren't doing more to combat rising extremism.
BBC reported the two venues targeted were mostly frequented by Kurds.
Who is the suspect?
German news agency dpa reported police were examining a video the suspect may have posted online several days earlier in which he details a conspiracy theory about child abuse in the United States. The authenticity of the video couldn't immediately be verified.
On a website registered by someone with the same name as the man in the video, Tobias R, the owner says he was born in Hanau in 1977 and grew up in the city, later training with a bank and completing a business degree in 2007.
The attack comes amid growing concerns about far-right violence in Germany.
Chancellor Angela Merkel called off a planned visit on Thursday to a university in Halle. Her spokesman, Steffen Seibert, said she was "being constantly kept abreast of the state of the investigations in Hanau."
'A horror scene'
A dark vehicle was spotted leaving the location of the first attack and another shooting was reported later at a second scene, about 2.5 km away.
Police officers swarmed central Hanau, cordoning off the area of one of the shootings as a helicopter hovered overhead.
A car covered in thermal foil also could be seen, with shattered glass next to it. Forensic experts in white overalls collected evidence.
Lawmaker Katja Leikert, a member of Chancellor Angela Merkel's centre-right party who represents Hanau in the German parliament, tweeted that it was a "real horror scenario for us all."
Hanau is about 20 km east of Frankfurt. It has about 100,000 inhabitants and is in Hesse state.
Police from neighbouring Bavaria were deployed to help their local colleagues, dpa reported.