The man, named as Ahmad A, had self-radicalised and had gone on the rampage "with the hope he would die as a martyr," added prosecutors.
The Palestinian suspect had entered a supermarket on a lively Hamburg high street on Friday, snatching from the shelves a 20 cm (eight-inch) knife which he used to slash at people around him. The assault left one dead and six wounded.
It was the first Islamist attack in Germany since Tunisian Anis Amri drove a truck into crowds at a Berlin Christmas market on December 19, killing 12 and injuring 48.
"It appears that there is a radical Islamist background to the act," prosecutors said.
The suspect had toyed with the extremist ideology for some time, and two days before he went on his rampage, he "finally decided to adopt a corresponding lifestyle," they said.
"On the day of the act, he resolved to commit an attack with the hope that he would die as a martyr," added prosecutors.
Germany has been on high alert over the threat of a jihadist assault since Amri's rampage in Berlin, for which the Islamic State group claimed responsibility.
Authorities had said earlier that Ahmad A. Was deemed to be an "Islamist" but not believed to be dangerous enough to warrant being monitored by police.
Hamburg's interior minister Andy Grote had initially said that there could have been an Islamist motive for the attack, the suspect also suffered from "psychological instability".
Like Amri, Ahmad A. Was due to have been deported after his asylum application was rejected by authorities, but the process was held up by a lack of identity documents.
Domestic security expert for Merkel's centre-right alliance, Stephan Mayer, hit out at Hamburg authorities for failing to apply more stringent criteria on rating the danger posed by Islamists.
Marcus Pretzell of the Islamophobic populist party AfD also leapt in, saying that Hamburg happened because of "carelessness on the state's part".
Meanwhile, Germany was celebrating a group of courageous passers-by who helped stop Ahmad A.
As he was fleeing the supermarket, bystanders gave chase, flinging chairs to stop him.
Disclaimer: No Business Standard Journalist was involved in creation of this content
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
