Eight people were killed in two shootings at shisha bars in the western German city of Hanau, police say.
Several other people were also injured after a gunman opened fire at 22:00 local time (21:00 GMT) on Wednesday.
In both places the clientele were reported to have been predominantly Kurdish. The suspect was later found dead at his home, along with the body of a second person.
The motive for the shootings is unclear. An investigation is ongoing.
Bild newspaper reported that the suspect was a German citizen with a firearms licence, and that ammunition and gun magazines had been found in his car.
What do know about the shootings?
The first incident was at Midnight shisha bar in the city centre of Hanau, about 25km (15 miles) east of Frankfurt. Witnesses reported hearing about a dozen gunshots, and at least three people were killed.
The suspect then reportedly fled in a dark car to the Kesselstadt neighbourhood and opened fire at the Arena Bar & Cafe, where five people were killed.
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 seven-hour manhunt, while officers searched for what they thought could have been more than one attacker.
Hanau Mayor Claus Kaminsky told Bild it had been a “terrible night”, adding: “You could not imagine a worse night. It will of course keep us busy for a long, long time and remain a sad memory. I’m deeply moved”.
The initial death toll was eight, but this was raised to nine in the early hours of the following morning after one of the wounded victims succumbed to their injuries.
Can-Luca Frisenna, who works at a kiosk at the scene of one of the shootings, said his father and brother were in the area when the attack took place.
“It’s like being in a film, it’s like a bad joke, that someone is playing a joke on us,” he told Reuters. “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.”
Hanau’s local MP Katja Leikert said: “Hopefully the injured recover swiftly. It is a horrific scenario for us all.”
In a statement, the state police force said: “The home address was blocked off extensively and searched by special police forces. Two other bodies were found. One of the dead people is most likely the culprit. There are currently no indications of other perpetrators.
“Investigations into the identity of the victims and the suspected perpetrator are ongoing.”
This attack comes four days after another shooting in Berlin, near a Turkish comedy show at the Tempodrom concert venue, which killed one person.
Gun laws in Germany are among the most stringent in the world, and were tightened further in recent years after other mass shootings.
In search of answers
By Damien McGuinness, BBC News, Berlin
Until we find out who the attacker was it is very hard to piece together why all of this happened.
Germany has had a number of terror-related attacks in recent years. But it has also seen a number of serious incidents that were initially labelled as terrorism but turned out to be linked to organised crime or some sort of family drama.
That is why people here have been very cautious about jumping to conclusions.
The fact that the shootings happened at shisha bars cannot be seen simply as a coincidence. But it is still too early to speculate what may be behind them.