German police on Saturday said they detained one person as they hunted for a man who stabbed three people to death and wounded eight others at a street festival in the city of Solingen.
The knifeman went on a rampage in the western town of Solingen late on Friday, as thousands had gathered for the first night of a "Festival of Diversity", part of a series of events to mark the town's 650th anniversary.
On Saturday, police in the city Duesseldorf, which lies just west of Solingen, announced they had detained a person as part of their investigation and were verifying whether they had "a connection with the crime".
Five of the wounded were in a "serious" condition, with a prosecutor saying a terror attack motive was "not excluded".
Solingen's centre was closed off after Friday's attack, as special forces and other security personnel swarmed the city centre and a helicopter flew overhead, according to an AFP journalist.
"Our security authorities are doing everything they can to catch the perpetrator" of the "horrific act", Interior Minister Nancy Faeser said, with Chancellor Olaf Scholz saying he "must be caught quickly and punished".
Thousands of people had gathered in front of a stage on the first night of the "Festival of Diversity" when the killing started.
"An unidentified man attacked several people with a knife around 9:40 pm (1940 GMT)," said the statement released by Duesseldorf police.
"Police are currently searching for the perpetrator with a large contingent," it added, encouraging witnesses to send them photos, videos and any other information about the attack.
"Out of nowhere, a man armed with a knife stabbed people at random and killed them," regional interior minister Herbert Reul said in comments at the scene.
"Why? Nobody knows. We cannot say anything yet about the motive," he added.
Witness Lars Breitzke told the Solinger Tageblatt newspaper he was a few metres from the attack, not far from the festival stage, and "understood from the expression on the singer's face that something was wrong".
"And then, a metre away from me, a person fell," said Breitzke, who at first thought it was someone who had too much to drink.
When he turned around, he saw other people lying on the ground amid pools of blood.
Solingen mayor Tim-Oliver Kurzbach said the whole city was in "shock, horror and great grief".
"We all wanted to celebrate our town's anniversary together and now we have to mourn the dead and injured," he said.
Hendrik Wuest, the premier of North Rhine-Westphalia state, also expressed his "shock and grief" in a post on social media platform X.
"An act of the most brutal and senseless violence has struck at the heart of our state," he said.
"The whole of North Rhine-Westphalia stands by the people of Solingen, especially the victims and their families."
Solingen is a city of some 150,000 people located between Duesseldorf and Cologne.
People had gathered in the town on Friday evening for the first day of the three-day "Festival of Diversity".
It was set to feature music, street theatre, variety shows and comedians in the city centre and several other areas, it said.
Up to 75,000 visitors had been expected to attend.
The Solinger Tageblatt said one of the festival organisers went on stage to announce it was cancelled.
Thousands of people cleared the area, the paper reported, with a journalist at the scene describing the atmosphere as "ghostly".
"People left the scene in shock, but calmly," Philipp Mueller, one of the organisers, told the newspaper.
Mueller said the rest of the festival would also be cancelled.
Germany has seen a series of knife attacks over the past 12 months, with the government promising to crack down on knife crime.
A police officer was killed and five people were wounded in a knife attack at a far-right rally in the city of Mannheim in May.