SOLINGEN, Germany — The Islamic State group claimed responsibility on Saturday for a knife attack in the German city of Solingen that killed three people and wounded eight others.  

Police have detained a 15-year-old and were investigating whether this person was linked to the attacker. The perpetrator was still at large on Saturday.  

Describing the man who carried out the attack as a “soldier of the Islamic State,” the militant group said in a statement on its Telegram account: “He carried out the attack in revenge for Muslims in Palestine and everywhere.”  

The statement did not immediately provide any evidence for its assertion, and it was not clear how close any relationship between the attacker and Islamic State was. 

Hendrik Wuest, premier of the state of North Rhine-Westphalia, described Friday evening’s attack during a festival in the city as an act of terror.  

“This attack has struck at the heart of our country,” Wuest told reporters.

Before the IS claim, Markus Caspers, an official with the public prosecutor’s office in Duesseldorf, said authorities were treating the attack as a possible terrorist incident because there was no other known motive and the victims seemed unrelated.  

The attack took place in the Fronhof, a market square in the western German city where live bands were playing as part of a festival marking its 650th anniversary. 

A police official, Thorsten Fleiss, said the assailant appeared to aim for his victims’ throats. 

“The perpetrator must be quickly caught and punished to the fullest extent of the law,” Chancellor Olaf Scholz said in a post on X. 

Police cordoned off the square on Saturday and passers-by placed candles and flowers outside the barriers. 

“We are full of shock and grief,” Solingen Mayor Tim-Oliver Kurzbach told journalists. 

Authorities canceled the remainder of the weekend festival. 

Fatal stabbings and shootings are relatively rare in Germany. The government said earlier this month it wanted to toughen rules on knives that can be carried in public by reducing the maximum length allowed. 

In June, a 29-year-old policeman was fatally stabbed in Mannheim during an attack on a right-wing demonstration. A stabbing attack on a train in 2021 injured several people. 

Solingen, well known for its knife manufacturing industry, is a city of some 165,000 people.  

The episode comes ahead of three state elections next month in Thuringia, Saxony and Brandenburg, in which the anti-immigrant far-right Alternative for Germany (AfD) has a chance of winning. 

Though the motive and identity of the assailant were not known, a top AfD candidate for one of the state elections, Bjoern Hoecke, seized on Friday’s attack, posting on X: “Do you really want to get used to this? Free yourselves and end this insanity of forced multiculturalism.”