Police in Germany say they have arrested a 15-year-old boy in connection with a deadly stabbing spree at a festival on Friday that left three people dead and eight others injured, officials said at a Saturday news conference.

The boy was detained following the horrific attack in the Fronhof, a market square in Solingen which is located near Cologne and Duesseldorf in the west of the country.

Police say he was suspected of knowing about the planned attack and failed to inform authorities, but he is not the attacker and the perpetrator is still at large.

Prosecutor Markus Caspers said that the 15-year-old boy was arrested after two female witnesses contacted police. The witnesses said they had listened to a conversation between the boy and an unknown person before the attack, speaking about intentions that corresponded to the events that followed.

GERMAN RIGHT WING CANDIDATE STABBED IN LATEST ATTACK AHEAD OF ELECTIONS

German police at the scene, mourners lay flowers and an aerial shot of the scene

A 15-year-old boy has been arrested in connection with a deadly stabbing spree at a festival in Germany on Friday that left three people dead and eight others injured. (Gianni Gattus/dpa via AP, main, Christoph Reichwein/dpa via AP, bottom left, Henning Kaiser/dpa via AP, bottom left.)

Caspers said that police are looking at a terror motive, adding that there’s no other obvious motive and that the attacker appears to be unknown to the victims. Police said there was no specific terror threat before the festival.

The victims were in front of a stage enjoying a live music band playing to mark the town's 650-year anniversary when the attack occurred at around 9:35 p.m. local time Friday.

The three people who died were two men aged 67 and 56 and a 56-year-old woman, authorities said. Police said the attacker appeared to have deliberately aimed for his victims’ throats.

Thorsten Fleiss from the German police, who was the chief of operations on Friday night, said that police are conducting various searches and investigations in the entire state of North Rhine-Westphalia that will continue throughout the day.

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

GERMAN POLICE OFFICER WHO WAS STABBED BY AFGHAN IMMIGRANT HAS DIED

Fatalities in attack at Solingen city festival

Police stand near the stabbing scene on Friday. The three people who died were two men aged 67 and 56 and a 56-year-old woman, authorities said. Police said the attacker appeared to have deliberately aimed for his victims’ throats. (Gianni Gattus/picture alliance via Getty Images)

Chancellor Olaf Scholz wrote on X late last night that the incident was a "terrible event that has shocked me greatly."

An attacker has brutally killed several people… The perpetrator must be quickly caught and punished to the fullest extent of the law," Scholz wrote.

In a translated social media post late Friday, the city’s mayor, Tim Kurzbach, said that they are in "shock" following the attack

"Tonight we are all in Solingen in shock, fright and great sadness," he wrote. "We all wanted to celebrate our city anniversary together, and now we have to mourn the dead and injured. Breaks my heart that there was an assassination attack on our town."

Fatal stabbings and shootings are relatively uncommon in Germany. The government said earlier this month it wanted to toughen rules on knives that can be carried in public.

In May, an Afghan migrant went on a stabbing spree in Mannheim, which is located in the southwest of Germany, where he wounded an anti-Islam activist and several others, including a police officer who died. Days later, a member of the German right-wing party Alternative for Germany (AfD) was stabbed in the city while canvassing for election. 

CLICK HERE TO GET THE FOX NEWS APP 

Emergency services and police at a stabbing scene in Germany Friday

Emergency services and police are deployed near the scene where three people were killed and injured in an attack at a festival in Solingen, Western Germany, the German dpa news agency reported, Friday, Aug. 23, 2024.  (Gianni Gattus/dpa via AP)

The violence comes ahead of three state elections next month in Thuringia, Saxony and Brandenburg, in which the anti-mass immigration right wing party, 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".

Fox News’ Sarah Rumpf-Whitten, Reuters and the Associated Press contributed to this report.