Isis has claimed responsibility for the attack on a train in Germany, describing the 17-year-old Afghan refugee who assaulted several passengers as an “Isis soldier”.

A video shared on the militant group's social media channels purported to show the attacker pledging allegiance prior to the incident, in which he injured four people with a knife and an axe before being shot dead by police.

Isis named the attacker as Muhammad Riayad and, according to the Site Intel Group, published a video in which the teenager was purported to have said: "I'll carry out a suicide op in Germany... I'll fight you so long as I've vein that beat and slaughter you."

Germany axe attack

Police have not yet confirmed his identity.

The video appears to show the attacker stating he would "slaughter infidels", adding: "I am a soldier of the caliphate and I am going to carry out an suicide attack in Germany.

"O Kufar, the time has passed when you would come to our homeland and kill our men, our women and our children. And your apostate rulers were silent about these massacres.

"That time is over now. Now the Islamic Caliphate has been established in Iraq, Al-Sham, Khorosan, Libya and Yemen and God Willing, soldiers of the caliphate will get you.

"They will slaughter you in your own back yard and they will live in your houses and break your rules and take your land. We will target you in every village, every city and every airport God Willing."

Amaq, the media arm of Isis, earlier cited an inside source saying: “The individual who carried out the axe attack in Germany was a soldier of the Islamic State who executed the operation in response to calls to target nations in the coalition fighting the Islamic State”.

Police found a “hand painted Isis flag” in the room of the young man, the German interior ministry revealed earlier today.

Of those injured, two were described as being in a life-threatening condition, following the attack on a train close to the city of Wurzburg in Bavaria on Monday night.

More than a dozen others were treated for shock in the wake of the attack, police said. There were around 25 to 30 people sitting in the regional train from Treuchtlingen to Würzburg.

Loading....

Witnesses said the attacker shouted “Allahu Akbar” (God is great) during the incident.

He had moved from a home for unaccompanied minor refugees to a foster family just weeks ago, and had lived in Germany for two years.

Eyewitness Thomas Velten, who went to see what had happened after the train stopped, told German newspaper Main Post that the carriage was “like a battlefield” with a large amount of blood.

Police said the attacker had used “blunt” and “slashing” weapons. These were said to have been an axe and a knife, according to local media.