A suspected right-wing extremist shot dead nine people, some of them migrants from Turkey, in an attack on two shisha bars in Germany.

The attack took place in Hanau, a town close to Frankfurt in the western state of Hesse, late last night.

Police chased a car used to leave the scene of one shooting to its owner's address, where they found the bodies of a 43-year-old German man called Tobias R and his 72-year-old mother, Hesse interior minister Peter Beuth said.

It is common for authorities in Germany to only give the initial of a suspect's surname.

Federal counter-terror prosecutors announced they were investigating the case, which showed "signs of a xenophobic motive", a spokesman said.

Mr Beuth said the perpetrator was in legal possession of arms and was a sports marksman.

The first attack occurred at the Midnight bar in the centre of the city around 10pm, reports said.

Three people were killed in front of the building, local media said, with witnesses reporting hearing a dozen shots.

There was then a second shooting at the Arena Bar.

A gunman reportedly rang the doorbell and shot people who were in the smoking section, killing five people including a woman, Bild reported.

Chancellor Angela Merkel condemned the "poison" of hatred and racism running through German society, after the shooting.

"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," she told reporters.

The victims included German citizens and foreigners aged between 21 and 44.

"The victims are people we have known for years," said the bar manager's son, quoted by DPA news agency.

Two employees were among the victims, according to the man, who was not at the bar during the shooting.

"It is a shock for everyone," he said.

Police said one of those injured in the attack had also died. Earlier, reports said five people had been seriously wounded.

Witnesses said heavily armed police officers were deployed in the city.

A silver Mercedes-Benz covered by what looked like a survival blanket could be seen behind a police cordon and surrounded by officers in front of the Arena Bar, with shattered glass on the floor.

The mayor of Hanau, Claus Kaminsky, told Bild that it had been "a terrible night".

"You could not imagine a worse night. It will of course keep us busy for a long, long time and remain a sad memory.

"The police must have the chance to clear up the situation and investigate - until then, we should wait with prudence, no matter how hard this may be," he said.

Katja Leikert, the MP for the region, said it was "a real horror scenario".

"On this dreadful night for Hanau, I would like to express my deepest condolences to the relatives of those killed. I hope the injured will recover quickly," she said.

Germany has been targeted in recent years by several extremist attacks, one of which killed 12 people in the heart of Berlin in December 2016.

Far-right attacks have become a particular concern for German authorities.

In October, a deadly anti-Semitic gun attack in the eastern city of Halle on the holy day of Yom Kippur underscored the rising threat of neo-Nazi violence.

The attack, in which two people were shot dead, was streamed live.

Last June, conservative politician Walter Luebcke, an advocate of a liberal refugee policy, was shot at his home.

On Friday, police arrested 12 members of a German extreme right group believed to have been plotting "shocking" large-scale attacks on mosques similar to the ones carried out in New Zealand last year.

German-Turkish Islamic organisation Ditib, which funds around 900 mosques in Germany, called for greater protections for Muslims in the country, saying they "no longer feel safe" in Germany.