One person has been stabbed to death and six others have been injured after an attack in Hamburg.

The incident occurred in a supermarket in the German city.

The man entered the supermarket and then proceeded to attack people, police said. He stabbed a number of people, one of whom died from their injuries.

(Julien Le Clézio/Twitter (Julien Le Clézio/Twitter)

After that he escaped, but witnesses followed him, overpowered him and alerted the police to his location, and he was arrested shortly afterwards near the crime scene.

One attacker has been arrested. Photos online showed the suspect sitting with a bloody hood over his head in a police car.

Initial reports had suggested that another man was being sought in connection with the attack, but police confirmed that the suspect appeared to be acting alone.

The motive for the attack wasn't immediately clear, police wrote on Twitter. "We have no clear information as to the motive or the number of wounded," Hamburg police said.

The attack happened in the Barmbek district, a suburb outside of the northern port city.

The suspect is a 26-year-old who was born in the United Arab Emirates, police said on Friday evening. They said they are still working to establish his nationality.