BERLIN — The German police said Saturday that the 26-year-old man accused of killing one person and wounding five others with a knife in Hamburg was known to them as a recently radicalized Islamist, but that they did not believe he posed an imminent danger.
The authorities in Hamburg were still piecing together what motivated the man, a Palestinian born in the United Arab Emirates, to attack shoppers and passers-by in and around a supermarket on Friday. They described him as suffering from psychological problems. The authorities did not release his name, in keeping with German privacy laws.
“It remains unclear which was the overriding element,” said Andy Grote, Hamburg’s interior minister. The man’s application for asylum had been rejected, and he was in the process of being deported, officials said.
The authorities said that they had so far found no indication that the man had any links to local or international terrorist groups, but that they were still looking into his background.
The police have opened an investigation and are holding the man on suspicion of murder and attempted murder, but charges will not be filed until the completion of a psychological assessment, said Jörg Fröhlich, the Hamburg state prosecutor.
Federal prosecutors, who handle terrorist attacks, have not yet taken over the case, he said.
But Friday’s attack is sure to draw parallels to the Dec. 19 truck attack on a Berlin Christmas market carried out by Anis Amri that killed 12 and wounded dozens. Like the Hamburg attacker, Mr. Amri was known to the police and was facing deportation, but still managed to slip through cracks.
Unlike Mr. Amri, who pledged loyalty to the Islamic State group, the Hamburg attacker has been cooperating with the authorities, who were trying to acquire identification papers for him from the Palestinian Authority, which are required for his deportation.
The authorities were alerted to the possible radicalization of the man after one of his friends contacted security officials, said Torsten Voss, director of Hamburg’s state intelligence agency.
“A friend of his told us that this guy used to frequently drink alcohol, but recently he had noticed a change,” Mr. Voss said, describing the friend’s conversation with officials in August 2016. “They said he started talking a lot about the Quran, stopped drinking alcohol and questioning many things.”
But last year an evaluator who interviewed the Palestinian — who spoke fluent English, Swedish and Norwegian — said that while he had mental health problems, he did not pose an imminent danger, Mr. Voss said.
The police have opened an investigation to piece together a motive for the assault, and they are looking through his cellphone and other items found in his home, said Kathrin Hennings, a spokeswoman for Hamburg police.
Germany’s interior minister, Thomas de Maizière, expressed horror at the latest attack, but he cautioned against jumping to conclusions before the police finished their investigation.
“Painful experience also teaches us that we must expect that jihadist ideology will be used as the reason or justification for acts that are perhaps carried out for very different reasons,” Mr. de Maizière said. “The true motive can also lie in the perpetrator’s personality. This is being investigated in Hamburg.”
Flowers and candles arranged in the shape of a peace symbol were laid out on the sidewalk in front of the supermarket in the northern district of Barmbek, where the attack took place on Friday.
Before the attack, the man had entered and then left the store, Ms. Hennings said. When he returned, he approached a man selling kitchen knives, grabbed one and fatally stabbed him, she said.
“He ripped off the packaging and then suddenly, brutally attacked the 50-year-old man, who later died,” Ms. Hennings said.
The attacker then stabbed other people, wounding a woman and four men as he left the store. Outside the store, passers-by tried to disarm him, she said.
Amateur video footage showed a group of men throwing chairs and other objects at the attacker in an attempt to stop him before the police arrived and detained him. One of the men was injured during the encounter, they said.