An ax-wielding assailant attacked passengers late Monday aboard a train in southern Germany, injuring at least four people, local news reports said.

The attack occurred on a commuter line near the Bavarian city of Wuerzburg, news accounts said. The assailant fled the train and was killed by police, the Frankfurter Allgemeine said, citing Bavarian officials.

Three of victims were said to be critically injured, the newspaper said.

Bavarian Interior Ministry officials told a Bavarian radio broadcaster that the suspect was a 17-year-old Afghan citizen. Interior Minister Joachim Hermann said the teenager appeared to have acted alone, adding that it was too early to say if it was an act of terrorism.

The assault occurred amid heightened fears about terrorist attacks four days after 84 people were killed in an apparent jihadist-inspired attack in the French Riviera city of Nice.

Initial accounts described the attack as occurring as the train neared Wuerzburg on a commuter line that originated in the city of Treuchtlingen. The unidentified male assailant began slashing at passengers with an ax and a knife, the Frankfurt Allgemeine reported. About 20 passengers were aboard the commuter train at the time.