A 26-year-old man has shot dead six people, including his mother and father, in a town in southwest Germany, police said, with two others seriously wounded.

The suspect "called the police station in (nearby town) Aalen ... to inform them he had shot several people," police chief Reiner Moeller told reporters.

The shooting happened in Rot am See, northwest of Stuttgart, at 12:48pm local time (11.48am Irish time).

Police said the young man stayed on the line, and when the first officers arrived minutes later at the hotel where the shooting took place, they immediately arrested him outside.

"They were then able to identify six dead people both inside and behind the building," Mr Moeller said, including three men aged 36, 65 and 69 and three women aged 36, 56 and 62.

Images from the scene showed large numbers of emergency vehicles and heavily armed officers sealing off the area with red and white police tape.

Meanwhile, forensics teams dressed in white coveralls moved in to secure evidence.

Two survivors of the attack are receiving medical treatment, with one of them "in danger for his life," Mr Moeller said.

The gunman had also threatened two children aged 12 and 14, leaving them shaken but unharmed.

Investigators have so far been unable to discover anything about the motive of the suspect, saying he would be questioned only when his lawyer arrived at the police station.

So far police have been able to confirm only that two of the dead were the suspect's father and mother.

"We are still clarifying the other relationships" between the group, Mr Moeller said.

The perpetrator - a German citizen - lived in the hotel along with some of the victims, near the town's train station.

German media had earlier reported that the group had met in the hotel for a family gathering, but police have so far been unable to confirm this.

Investigators say the shooting was carried out with a semi-automatic handgun, for which the suspect held a license for sport shooting. The weapon was found inside the building.

Mass shootings rare in Germany

The ownership of firearms is not illegal in Germany, but most guns can be acquired only with a licence and they are closely monitored, making mass shootings comparatively rare.

Last October, a far-right attacker shot two people dead in the eastern city Halle, wounding several more after failing to break into a packed synagogue armed with home-made weapons.

In July 2016, a teenager used a pistol bought illegally online to kill nine people in a Munich shopping centre, before turning the weapon on himself.