A Palestinian man who allegedly stabbed one person to death and injured six others in Hamburg was known to German authorities as a suspected Islamic radical but was also psychologically unstable, officials said.
The suspect, a 26-year-old who had no identity papers other than a birth certificate showing he was born in the United Arab Emirates, was quickly overwhelmed by passers-by and arrested after Friday's attack at a supermarket in Hamburg's Barmbek district.
He was not named by authorities, in keeping with Germany privacy laws.
The man's motive remained unclear on Saturday, but he is believed to have acted alone and there are no indications that he had links to any network, Hamburg state interior minister Andy Grote said.
Police said the suspect grabbed a kitchen knife with an 8in (20cm) blade from a shelf at the supermarket on Friday afternoon and stabbed three men, one of them fatally.
He then left the shop and injured another three people outside, not all of them with the knife. Passers-by then pursued and overwhelmed the suspect, who was arrested by police.
Mr Grote said none of the wounded suffered injuries considered to be life-threatening, though some were seriously hurt.
The man arrived in Germany in March 2015 after stops in Spain, Sweden and Norway. His request for asylum was rejected late last year and authorities were trying to secure new Palestinian papers to deport him - a process in which they said he had co-operated.
Officials said he was on their radar as a suspected Islamic radical, but not as a "jihadist".
A friend had tipped off authorities about changes in the man's behaviour, telling them he had stopped drinking alcohol and started talking about the Koran, said Torsten Voss, head of the Hamburg branch of the domestic intelligence agency.
Officials interviewed the man and came away with the impression that he was a "destabilised personality" but not someone who posed an immediate danger, Mr Voss said.
"We evaluated him rather as someone who was psychologically unstable than had clear Islamic extremist motivations," he told a news conference. Authorities are not aware of any connections to Hamburg's Islamic extremist scene.
A search of the man's room at a centre for asylum-seekers turned up no weapons or weapon-like objects, prosecutors said.
The suspect has not yet talked about Friday's attack, prosecutor Joerg Froehlich said, though he has indicated that he acted alone.
Mr Froehlich said authorities intend to ask that he be held in custody on suspicion of murder and five counts of attempted murder, but may seek to have him held at a psychiatric unit instead.
Independent journalism costs money. Support Times of Malta for the price of a coffee.Support Us