The man suspected of killing nine people in two separate shootings in the German city of Hanau has been found dead at his home alongside his mother.
Nine people were killed and five wounded in the shootings in and outside two hookah lounges on Wednesday evening.
Police gave no details of the suspected 43-year-old gunman, who is believed to have held far-right views, but said "there are currently no indications of further perpetrators”.
Witnesses and surveillance videos of the suspect's getaway car led authorities 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.
Federal prosecutors said they were taking charge of the investigation amid reports that an online video linked to the suspect indicated he may have had a far-right motive.
"Initial analysis of the webpage of the suspect indicate a xenophobic motivation," Mr Beuth said.
He said federal prosecutors have taken over the investigation of the crime and are treating it as an act of domestic terrorism.
"This is an attack on our free and peaceful society," he added.
Officers sealed off and searched an apartment in the city’s Kesselstadt district, near the scene of one of the shootings, after following up witness statements on a getaway car.
Some of the victims are believed to be Turkish, and Turkey's foreign minister Mevlut Cavusoglu said the consulate in Frankfurt and the embassy in Berlin are trying to obtain information on the attack.
Bild have named the suspect as 'Tobias R' and say he left behind a video and a letter referring to the “extermination of certain peoples”, but these claims have so far not been verified.
German news agency dpa also reported that investigators are examining a video the suspect may have posted online several days earlier in which he detailed a conspiracy theory about child abuse in the US.
Police had earlier said a dark vehicle was seen leaving the location of the first attack and another shooting was reported at a scene about a mile away.
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.
Can-Luca Frisenna, whose father runs a local shop, said he rushed to the scene after receiving a phone call saying his father and brother may have been caught up in the shooting.
He told Reuters: "But then I saw them both – they were horrified and they were crying and everything.
"It is like being in a film, it's like a bad joke, that someone is playing a joke on us. I can't grasp yet everything that has happened.
"My colleagues, all my colleagues, they are like my family, they can't understand it either, but I hope that there is a hope that god is with them."
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".
Seibert added on Twitter: “Thoughts this morning are with the people of Hanau, in whose midst this terrible crime was committed.
"Deep sympathy for the affected families, who are grieving for their dead. We hope with those wounded that they will soon recover."
Hanau mayor Claus Kaminsky added: "This was a terrible evening that will certainly occupy us for a long, long time and we will remember with sadness.”
Hookah lounges are places where people gather to smoke flavoured tobacco from Middle Eastern water pipes.