The attack took place in the southern state of Bavaria - in a plaza in the center of the city of Würzburg. Pedestrians tried to stop the attacker and may have prevented more bloodshed.
The knifeman struck in the historic center of Würzburg, which was crowded with shoppers on a sunny afternoon. Authorities say the attacker was a 24-year-year old Somali man with a history of mental illness. Witnesses said he started stabbing people for no apparent reason - but was confronted by passers-by.
Police shot the man in the leg before arresting him. Officials say the attacker was known to have violent tendencies and was undergoing compulsory psychiatric treatment. Police at the scene were quick to reassure the public that they were in no further danger. Bavaria's premier, Markus Söder, says the state is grieving for the victims and their families.