By Tony Nwanne A teenager armed with an axe and a knife attacked about 20 passengers on a train in northern Bavaria, according to local police. Three people were seriously hurt and one person sustained light injuries before the attacker was shot dead by police, a police spokesman said on Monday evening. Bavaria’s interior minister, Joachim Herrmann, said the attacker was a 17-year-old Afghan asylum seeker who had arrived in Germany as an unaccompanied minor and had been living with a foster family in Ochsenfurt, south of Würzburg, for “a few months”. After passengers managed to alert the driver, the train was stopped in the Heidingsfeld district of Würzburg, and the attacker had initially managed to flee from the carriage on foot, Herrmann said. A police taskforce that happened to be in the vicinity then pursued the attacker, shooting dead the 17-year-old, who was carrying an axe and a knife when he had attacked members of the unit. Asked whether the attack had an Islamist background, Herrmann said one witness inside the train said the teenager had shouted “Allahu Akbar” during the assault. The report was being investigated. The man reportedly attacked passengers on the regional train travelling between the town of Treuchtlingen and Würzburg. Fourteen other passengers were reportedly in a state of shock and receiving treatment by specialists. The interior ministry could not confirm whether some of the victims were in a life-threatening condition. The train line between Ochsenfurt and Würzburg remained closed while police investigated. Police initially said there was no indication of a motive, and they were treating the attacker as a lone individual, citing witness reports. Germany, which has been at the heart of the refugee crisis over the last year, has not seen any attacks with an explicit terrorist motive. In November a football friendly between Germany and Holland in Hanover was cancelled after a terrorist attack tip-off, with interior minister Thomas de Maiziére saying there had been a ‘concrete threat’ of an attack.