A man wielding a large kitchen knife stormed into a supermarket in the German city of Hamburg on Friday, killing one person and wounding four others before being detained by police.
"There is no valid information yet on the motive" of the man, who "entered a supermarket and suddenly began attacking customers", said police.
German daily Bild published a picture of the attacker in the back of a police car with a white, blood-soaked bag over his head, and reported that he cried "Allahu Akbar" (God is Greatest) in the supermarket.
A female witness standing in line at the supermarket till also told NTV rolling news channel that "as he was running out... he held up his arms and shouted 'Allahu Akhbar'."
She said she was "afraid of dying," as she was "queuing for the till and couldn't get away".
A police spokeswoman said the "Allahu Akhbar" accounts could not be confirmed.
The suspect, who has not yet been identified, fled the supermarket after the attack.
But witnesses gave chase and overpowered the man, who was slightly injured.
"It was definitely a sole attacker. The first reports about a possible motive of a robbery have not been confirmed," Hamburg police tweeted.
Police have blocked off the lively and diverse high street dotted with cafes and shops in the northeast of the port city, Germany's second largest and host of the G20 summit of world leaders in early July.
Anti-terror police have also been deployed to the scene, according to Bild.
Homicide investigators are leading the probe, said police, adding that they were pursuing "all leads" for a motive.
There was no information immediately available about the dead person. Police said that one of the four injured was in a serious condition.
Germany has been on high alert about the threat of a jihadist attack, especially since last December's truck rampage through a Berlin Christmas market that killed 12 people.
The Islamic State group claimed responsibility for the carnage in which a Tunisian rejected asylum seeker and ex-convict, Anis Amri, 24, ploughed the stolen truck through a crowd.
It was Germany's deadliest attack by an Islamist militant, but not the first.
In 2016, the IS group also claimed a suicide bomb attack in the southern city of Ansbach which wounded 15 victims, and an Afghan man's axe rampage on a train in Bavaria that hurt five, before the perpetrator was shot dead by police.
Public fears about more extremist violence have grown amid Germany's mass influx of refugees and migrants, mostly from Syria, Iraq, Afghanistan as well as several African countries.
More than one million asylum seekers have arrived in Germany since Chancellor Angela Merkel opened the country's borders in 2015.
Germany's domestic intelligence service estimates there are about 10,000 radical Islamists in the country, including 1,600 who are considered potentially violent.
In one case of a homegrown attacker, a German teenager identified as 16-year-old Safia S. was in January sentenced to six years of juvenile detention for stabbing a police officer in 2016 "to support the Islamic State group".
Authorities were also investigating an IS claim of the stabbing death of a teenage boy in Hamburg last October.
The 16-year-old boy was fatally wounded in the knife assault on the banks of the Alster river but a 15-year-old girl who was with him escaped unharmed after the attacker shoved her into the water.
Germany is a target for jihadist groups, particularly because of its reconnaissance and refuelling missions to support the coalition fighting IS in Iraq and Syria, and because it has deployed troops in Afghanistan since 2001.