The assault on a regional train near the southern city of Wuerzburg yesterday left two of the victims in a critical condition, said Joachim Herrmann, the interior minister of Bavaria state. The teenage assailant was killed as he tried to flee.
"We hope that those who were gravely injured make it," Herrmann told ZDF public television.
The assailant had arrived as an unaccompanied minor in Germany, Herrmann said. A hand-painted flag of the Islamic State group was found among the belongings of the Afghan refugee, who had been staying with a foster family in the region.
However he stressed that the investigation was ongoing and that the teenager appeared to have acted alone.
Also Read
The assault happened around 9:15 pm (local time) on the train which runs between the town of Treuchlingen and Wuerzburg in Bavaria.
An eyewitness who lives next to the railway station told DPA news agency that the train, which had been carrying around 25 people, looked "like a slaughterhouse" with blood covering the floor.
The man, who declined to give his name, said he saw people crawl from the carriage and ask for a first-aid kit as other victims lay on the floor inside.
Herrmann later said that the teenager was shot when he attacked police while trying to escape the scene.
The four seriously injured victims are members of a family from Hong Kong, authorities in the southern Chinese city said today, adding the immigration department was providing them with assistance.
Germany has thus far escaped the kind of large-scale jihadist attacks seen in the southern French city of Nice last week, in which 31-year-old Mohamed Lahouaiej Bouhlel used a truck to mow down people leaving a Bastille Day fireworks display, killing 84 people.
In February a 15-year-old girl of Turkish origin stabbed a policeman in the neck with a kitchen knife at Hanover train station in what prosecutors later said was an IS-inspired attack.
Police in April arrested two 16-year-olds over an explosion that wounded three people at a Sikh temple, in what was believed to be an Islamist motivated attack against an Indian wedding party at a temple in the western city of Essen.