The Islamic State group said Saturday in a statement that one of its members carried out a deadly attack a day earlier in Germany in "revenge" for Muslims "in Palestine and everywhere".

"The perpetrator of the attack on a gathering of Christians in the city of Solingen in Germany yesterday was a soldier of the Islamic State" group, said a statement from the jihadists' Amaq news agency on the Telegram messaging app.

The attack was carried out "in revenge for Muslims in Palestine and everywhere", the statement added.

German police on Saturday said they detained two arrested in relation to the fatal stabbings 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.

One person who was detained by police is a 15-year-old suspected of being in contact with the knifeman.

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".

The people killed were men of 56 and 67 years of age and a 56-year-old woman, officials said.

"The victims were completely unknown with no known ties between them, so based on this we're concluding that it could be a terror act," Caspers said, adding that "no other motive is evident at this time".

"After analysing the first images, we're going on the principle that it was an attack targeted toward the neck," police chief Thorsten Fleiss told the press conference. 

Four of the wounded were in a "serious" condition".

Interior Minister Nancy Faeser said Germany's "security authorities are doing everything they can to catch the perpetrator" of the "horrific act", while Chancellor Olaf Scholz said he "must be caught quickly and punished".

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" 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.

'A person fell'

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.

'Brutal and senseless'

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.

Festival cancelled

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.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.