SOLINGEN, Germany — Special police units on Saturday joined the search for an unknown man who carried out a stabbing attack at a crowded festival in the western German city of Solingen, killing three people and wounding at least eight others, five of them seriously.

“The police are currently conducting a large-scale search for the perpetrator,” police said in a statement. “Both victims and witnesses are currently being questioned.”

Police did not indicate that they had yet established the identity of the attacker and warned people to stay vigilant even as well-wishers started to leave flowers at the scene. Police established an online portal where witnesses could upload video and any other information relevant to the attack.

People alerted police shortly after 9:30 p.m. Friday to an unknown attacker having wounded several people with a knife on a central square, the Fronhof. Police said they believe the stabbings were carried out by a lone attacker and gave no information about the identities of the victims.

“Last night our hearts were torn apart. We in Solingen are full of horror and grief. What happened yesterday in our city has hardly let any of us sleep,” the mayor of Solingen, Tim Kurzbach, said, speaking to reporters on Saturday near the scene of the attack.

The “Festival of Diversity,” marking the city’s 650th anniversary, began Friday and was supposed to run through Sunday, with several stages in central streets offering attractions such as live music, cabaret and acrobatics.

The attack took place in the crowd in front of one stage. Hours after the attack, the stage lights were still on as police and forensic investigators looked for clues in the cordoned-off square.

One of the festival organizers, Philipp Muller, appeared on stage on Friday and asked festivalgoers to “go calmly; please keep your eyes open, because unfortunately the perpetrator hasn’t been caught.” Solingen has about 160,000 residents and is near the bigger cities of Cologne and Duesseldorf.

The rest of the festival was canceled.

German Chancellor Olaf Scholz said on Saturday that the perpetrator of the attack must be caught quickly and punished with the full force of the law.

“The attack in Solingen is a terrible event that has shocked me greatly. An attacker has brutally killed several people. I have just spoken to Solingen’s mayor, Tim Kurzbach. We mourn the victims and stand by their families,” Scholz said on social media platform X.

German President Frank-Walter Steinmeier also spoke to the mayor Saturday morning.

“The heinous act in Solingen shocks me and our country. We mourn those killed and worry about those injured, and I wish them strength and a speedy recovery from all my heart,” Steinmeier said in a statement on Saturday.

“The perpetrator needs to be brought to justice. Let’s stand together — against hatred and violence.”

There has been concern about increased knife violence in Germany. Interior Minister Nancy Faeser recently proposed toughening weapons laws to allow only knives with a blade measuring up to 6 centimeters (almost 2½ inches) to be carried in public, rather than the 12 centimeters currently allowed.