The Hamburg city government said the shooting took place in the Gross Borstel district.
Police previously said on Twitter that a large operation was underway in the next-door Alsterdorf district.
The area is a few kilometres north of the downtown area of Hamburg, which is Germany’s second-biggest city.
The German news agency dpa reported that “several” people were dead and some injured, but didn’t give precise figures. It also reported seeing rescue services taking people out of a building used by Jehovah’s Witnesses.
The shooting happened around 9pm.
Other reports said at least six people had been killed.
Read Related Also: Trump fumes Rihanna has ‘NO TALENT’ ahead of Super Bowl halftime show
Police said they were alerted to the shooting about 9.15pm. and were on the scene quickly.
They said that after officers arrived, they heard a shot from an upper floor.
The police statement said there was no immediate indication that a shooter was on the run and that it appeared likely that the perpetrator or perpetrators were either in the building or among the dead.
Police had no information on the event that was under way in the building when the shooting took place.
They also had no immediate information on a possible motive.
An emergency alert has been sent out to residents in the area warning them of one of more perpetrators.