The killer’s motive remained unknown but a political reason had been ruled out, the officials said.
Authorities identified the gunman only as Philipp F. The 35-year-old, a German citizen and former Jehovah’s Witness, began shooting through a window at the hall, where dozens of people were gathered, before entering.
He shot himself on the first floor when police arrived minutes after the shooting started shortly after 9:00 p.m. (2000 GMT), the police said.
Germany has suffered a number of mass shootings in recent years as well as a plot by a heavily armed group that aimed to overthrow the government. Following the previous shootings, Germany introduced stricter gun ownership rules and the government has announced plans to tighten controls further.
The Hamburg shooter was known to police, who had visited his apartment prior to the attack in response to an anonymous tip raising concerns about his state of mind. But they did not have enough grounds to take away his weapon, a legally-held semi-automatic pistol made by German company Heckler & Koch, officials said.