Nine people were killed in two shootings at hookahouses in the West German town of Hanau.
Several other people were injured after a militant opened fire at 22:00 local time on Wednesday, police said.
The suspect was later found dead at his home, along with the body of the second man, police reported.
There appear to have been no other perpetrators, they added and said the investigation is ongoing.
The motive for the attack is unclear.
The Bild newspaper reported that the suspect was a German citizen with a firearms license and that ammunition and gun shops were found in his car.
The first shooting took place at midnight in the hookah room in the city centre and the second at the Arena bar and café in the Hanau Kesselstadt district.
It was reported that customers were predominantly Kurds.
Initially, the death toll was eight, but the following morning, when one of the wounded died from his wounds, the death toll rose to nine.Macron’s Special Representative: anti-Russian sanctions damage Europe