"The mourning for the lost people will never end," said Würzburg's mayor.
Prime Minister Markus Söder also came to the memorial ceremony in Kiliansdom.
Würzburg - Bells ringing for minutes: At a memorial service in Würzburg's Kilians Cathedral, many people thought of the victims of the fatal knife attack on Friday.
The violent crime had shaken people to the core, said Würzburg's Bishop Franz Jung on Sunday.
"The mourning for the lost people will never end," said Würzburg's Lord Mayor Christian Schuchardt (CDU).
"The evening before last I was paralyzed and shocked with horror." He warned against taking other refugees into kin for the act of the Somali, whose motive, according to investigators, is still unclear.
The 24-year-old refugee stabbed three women and injured seven people in the city center on Friday afternoon, five of whom were life-threatening.
He has been arrested and is on remand.
In addition to relatives of the victims and emergency services, numerous representatives from politics and public life were invited to the memorial service.
Among them were the President of the State Parliament Ilse Aigner, Bavaria's Prime Minister Markus Söder (both CSU) and the President of the Central Council of Jews in Germany, Josef Schuster.
dpa