Police say they have ruled out a “political motive” for the attack and believe the suspect acted alone.
The victims range in age from 19 to 85.
The four in serious condition were a 24-year-old man and three women, aged 24, 52, and 85, police said.
Emergency officials initially said their wounds were life-threatening, but police say all the victims now appear to be out of immediate danger.
Rush hour
The attack took place just after 6pm local time on one of the platforms in front of a standing train, German media reported.
The suspect was thought to have turned “against passengers” at the station, a spokeswoman for the Hanover federal police directorate, which also covers Hamburg, told AFP.
Some of the victims were treated onboard waiting trains in the station, German daily Bild reported.
Images of the scene showed access to the platforms at one end of the station blocked off by police and people being loaded into waiting ambulances.
Forensic police could also be seen walking up and down the platforms where the attack took place.
German Chancellor Friedrich Merz expressed his shock in a call with the mayor of Hamburg.
“My thoughts are with the victims and their families,” Merz said, according to a readout from a spokesman.
Germany has been rocked in recent months by a series of violent attacks with suspected jihadist or far-right extremist motivations that have put security at the top of the agenda.
The most recent, on Sunday, saw four people injured in a stabbing at a bar in the city of Bielefeld.
The investigation into that attack has been handed over to federal prosecutors after the Syrian suspect told the police officers who arrested him that he had jihadist beliefs.
The question of security – and the immigrant origin of some of the attackers – was a major topic during Germany’s recent election campaign.
Merz’ conservative CDU/CSU topped the February vote, which also saw a record score of more than 20% for the far-right, anti-immigration Alternative for Germany (AfD).
Last year, Germany toughened its legislation on carrying knives, now banned at public gatherings and on long-distance trains.
They are also banned in specific zones in some cities, including at Hamburg’s train station.
But experts and police unions have previously questioned whether such bans are effective.
- Agence France-Presse