German police say two people have been killed and several wounded in a shooting at a disco in the southern city of Konstanz.
Police said the 34-year-old gunman opened fire at the disco in the early hours of July 30, killing a security guard and wounding four other people before being shot by police.
Police ruled out terrorism as a motive for the attack and said the gunman was an Iraqi citizen who came to Germany from Iraq in 1991 and was not an asylum seeker.
"We are still investigating but the circumstances surrounding the events at the disco in the evening before the shooting are a bit clearer and this led us to rule out a terrorism background," said Konstanz police spokesman Fritz Bezikofer.
The police statement said the attacker "was critically injured in a shootout with police officers as he left the disco, and later succumbed to his wounds in hospital."
Police said the man was the son-in-law of the club's operator and had a criminal record that included assault and drug-related convictions and that the shooting likely developed out of a disagreement.
Earlier, authorities deployed special forces in the city as it was not clear if the suspected had acted alone or had accomplices.
The attack came after a 26-year-old migrant killed one person and injured six others in a knife attack in the northern city of Hamburg on July 28.
German authorities said the attacker had shown signs of radicalization prior to the attack.
Based on reporting by dpa and AFP