A Palestinian asylum-seeker who killed one person and injured six in a knife attack in Hamburg has reportedly told police it was an Islamist terror attack.

The 26-year-old, named only as Ahmad A under German privacy laws, told police he was wanted to be a “terrorist”, according to Süddeustche Zeitung newspaper.

But police are said to have their doubts over the confession, and believe he may be psychologically ill.

No group has claimed responsibility for the attack, and there is no evidence that Ahmad A was in contact with jihadist groups in the Middle East.

Witnesses described Ahmad A shouting “Allahu akbar” as he ran into a supermarket and began stabbing people at random last Friday.

The attack appears to have been spontaneous rather than planned: Ahmad A grabbed the knife he used from the supermarket shelves.

He was investigated as a potential Islamic extremist threat last year but authorities concluded in January he was in fact suffering from psychological illness and recommended he be referred for psychiatric treatment, it has emerged. But he never received treatment.

Ahmad A is believed to have been radicalised while staying at a refugee shelter in Hamburg that has become notorious for violence.

Police have been called there because of riots, and cars belonging to local residents have been set on fire nearby.

The 26-year-old is believed to be a suicide risk and is being held in a cell furnished only with a mattress, where guards check on him every 10 minutes.

Tags: ; ; ; ; ;