Daesh claimed Tuesday that a teenage Afghan refugee was one of its "fighters" after he carried out a stabbing attack on a German commuter train that left five people injured.
The 17-year-old Afghan "carried out the operation in response to calls to target states in the coalition fighting Islamic State," the extremist group's news agency Aamaq said via its channels on the secure messaging app Telegram.
The teen's stabbing spree with a knife and an axe took place at 9:15 pm (1915 GMT) on a commuter train near the southern German city of Wuerzburg.
He reportedly yelled an "Islamist exclamation" before being shot dead by police, said Joachim Herrmann, the interior minister for the southern state of Bavaria.
A "hand-painted Islamic State flag" was subsequently found in the teen's room, Herrmann said.
Police are investigating whether the teen was motivated by radical Islamism and are working on the assumption that he acted alone, the minister added.
The Aamaq claim is typical of how Islamic State has said it was behind recent so-called lone wolf attacks and is phrased the same way as the group's claim for the truck attack that killed 84 people in southern France last week.
Analysts say Islamic State claims such attackers as members even if they have had no prior contact with the group, as long as they have pledged allegiance to the group's leader, Abu Bakr al-Baghdadi.
The teen's motive has not yet been established, but similar attacks in Germany have been linked to radical Islam.
In May, a man allegedly shouted "Allahu Akbar" (God is great) before killing one person and wounding three at a train station near Munich.
Four of the five victims of Monday's attack were members of a family of tourists from Hong Kong.
The 62-year-old father, his 58-year-old wife, their daughter, 26, and her boyfriend, 30, were seriously injured, while the couple's 17-year-old son escaped unscathed.
Another person suffered minor injuries, while 14 train passengers suffered from shock.
A witness who lives near the location where the train was brought to a halt told dpa the compartment looked "like a slaughterhouse" after the attack.
The Afghan is one of 96,000 unaccompanied minors who entered Europe as refugees in 2015, according to UNICEF. Many of them suffer from post-traumatic stress disorder.
German police have also launched an internal investigation into whether shooting him dead was justified, a spokesman said.
Renate Kuenast, a leading politician from Germany's Green Party, has criticized the police's behaviour, saying he should have been incapacitated - not killed.
© 2019 dpa GmbH