The so-called Islamic State has released a video claiming to show the Afghan teenager behind the German train attack.
The axe and knife attack on a German train left four people injured.
An unverified video released by ISIS, a young man wields a small knife, which he says he will use to slaughter infidels and avenge the deaths of men, women and children in Muslim countries.
It is not immediately possible to verify that the man in the video was the train attacker. The video was posted by Islamic State's news agency, Amaq.
The 17-year-old was was later shot and killed by police in Würzburg-Heidingsfeld, Bavaria.
ITV News Security Editor Rohit Kachroo reports:
A hand-painted flag had already been found in the room of the 17-year-old Afghan migrant after the attack on Monday, and witnesses reported the teenager shouting "Allahu Akbar" ("God Is Great").
"The perpetrator of the stabbing attack in Germany was one of the fighters of the Islamic State and carried out the operation in answer to the calls to target the countries of the coalition fighting the Islamic State," IS said in a statement released through its online Amaq news agency.
But ITV News Security Editor Rohit Kachroo said the claim - the terror group's first in Germany - should be treated with caution.
The Bavarian interior minister said the police investigation was still ongoing and there was "no indication" of an Islamist network relating to the attacker.
He added the attack was no reason to be suspicious of refugees and there was no indication of a particular target.
One witness, who declined to give his name, said there was so much blood in the train carriage it looked "like a slaughterhouse".
The four injured are members of the same family from Hong Kong, authorities in China said.
Two are said to be in a serious condition.
Another 14 people were being treated for shock.
"We hope that those who were gravely injured make it," the Bavarian interior minister told ZDF public television.
He added investigations were ongoing but police believe the attacker was acting alone.
The train was on its way from the Bavarian town of Treuchtlingen to Wuerzburg, 60 miles north-west of Nuremberg.
The suspect is believed to have travelled to Germany as an unaccompanied minor but it is unknown if he was one of the 1.1 million migrants who entered the country last year.
ITV News Security Editor Rohit Kachroo reports from the scene
Germany has so far escaped large-scale terror attacks such as that seen last week in Nice, but there have been more minor incidents.
In May, a mentally unstable man killed one person and injured three others in a knife attack on a train.
And in February a 15-year-old girl of Turkish origin stabbed a policeman in the neck at Hanover train station in what prosecutors later said was an IS-inspired attack.