The nine victims of a suspected far-right attack in Hanau included both German and foreign citizens and were aged between 21 and 44, Germany's federal prosecutor Peter Frank has said.

The suspect, a 43-year-old German man, carried out his deadly attacks at two shisha lounges in Hanau, a town not far from Frankfurt, on Wednesday night.

More:

After the rampage, the suspect, named as Tobias R, was found dead at his apartment along with his mother, according to officials. It is believed the suspect killed his mother and then himself.

The attack late on Wednesday has sent shockwaves throughout Germany, which is dealing with an increased far-right threat.

Police are working to identify the victims.

Some of those killed were of Turkish origin, a spokesman for the Turkish presidency said.

"We expect German authorities to show maximum effort to enlighten this case. Racism is a collective cancer," Ibrahim Kalin said on Twitter.

German magazine Focus cited security sources as saying many of the victims had an immigrant background. One victim, a permanent resident of Germany, was a citizen of Bosnia and Herzegovina, the Bosnian ministry of foreign affairs confirmed.

200220073658913

Can-Luca Frisenna, whose father and brother run one of the shisha bars, said he rushed to the scene after hearing about the shooting.

"I heard my father was affected and my little brother, they run the kiosk, I don't have much to do with it," said Frisenna. "But then I saw them both - they were horrified and they were crying and everything. So everyone was shocked."

On Thursday morning, forensic police in white overalls inspected the crime scene, cordoned off close to Hanau's historic market place. Nearby, traffic flowed as normal and commuters waited for buses.

Kadir Koese, a 38-year businessman who runs a bar opposite one of those attacked, described hearing shots being fired.

"There was a guy lying on the sidewalk, shot in the head, I think. My neighbour said 'get down'. The police came quickly," he said.

A projectile lies on the sidewalk near a restaurant at the scene of a shooting in central Hanau [Michael Probst/AP]

Government spokesman Steffen Seibert tweeted: "Deep sympathy goes out to the families concerned, who are mourning the loss of their dead. With the injured, we hope they will soon recover."

Annegret Kramp-Karrenbauer, the leader of Chancellor Angela Merkel's Christian Democrats (CDU), said xenophobia was a growing problem in Germany.

"It's poison to see people as opponents, to see yourself as better than others, to see fellow citizens as foreigners - that's a poison that is increasingly penetrating society and can ultimately lead to these crimes," she said.

Merkel said the German government would use "all its might" to stand up to those who try to divide the country, adding there was much to indicate that racism motivated the Hanau shootings.