At least three of the victims suffered “serious” injuries, police spokesman told local news outlet Blaulicht Würzburg.
Another person suffered light injuries, while all 14 passengers who had been in the same car of the regional train were in a state of “shock” following the onslaught.
The perpetrator, who fled the scene after the attack, was “shot” by officers, police confirmed.
Bavarian Interior Minister Joachim Herrmann announced that authorities believe that a 17-year-old teen of Afghan origin was behind the attack.
The suspect entered the country as an “unaccompanied minor” and lived with a “foster family” for the last two weeks. Before that he had been housed at the Kolping-Heim refugee center, FOCUS online reported.
The minister also refuted claims of a possible second attacker, and are treating the attack as a “single perpetrator” case.
Some German media reports suggest that the 17-year-old attacker who resided in Ochsenfurt shouted “Allahu Akbar”(God is great) as he charged at his victims.
A police helicopter was circling the area and a large number of officers were deployed to the scene. Over a dozen paramedics also arrived on site.