A memorial service was held in the German city of Würzburg on Sunday after a knife attack left three women dead.
The 24-year-old suspect attacked people in a store, leaving another five people injured. The Somali refugee was then shot in the leg by police and arrested.
Authorities are still looking for a possible motive, assessing his mental health and working to determine whether he had been radicalised as an extremist.
It was unclear whether he deliberately targeted women.
“We are all affected, because it could have happened to anyone,” Würzburg's Catholic bishop, Franz Jung, said at the service in the city's cathedral.
The service was attended by relatives of victims, the regional Protestant bishop, a representative of the city's Muslim communities, Germany's main Jewish leader, Bavaria's political leaders, and police and rescue officers.
The city's mayor Christian Schuchardt warned that Somalis and refugees in general should not be blamed for the attack.
Bavaria's governor, Markus Soeder, laid a wreath and described the attack as “simply incomprehensible, appalling, senseless.”
“We must never answer such a hate-filled deed with hatred or revenge," Soeder said. “I'm reading on the internet that some are saying, ‘it was someone with an immigrant background.’ Yes, but didn't people with an immigrant background also help in exactly the same situation?”
The suspect was sent to jail on Saturday pending a possible indictment.
The regional criminal police office said Sunday prison officials have been informed that he could be a danger to himself, news agency dpa reported.