UPDATE: 4:33 a.m. EDT — The teen Afghan refugee, who attacked train passengers in Germany’s Würzburg city, may have been self-radicalized, a top German security official said Tuesday, according to the Associated Press.

The development came after authorities checked the 17-year-old’s room. Officials are investigating claims that the attacker — who was shot dead by police — exclaimed “Allahu Akbar” (God is great) during the attack. The Islamic State group claimed responsibility for the attack, according to ISIS official news agency Amaq.

UPDATE: 4:33 a.m. EDT — The official news agency of the Islamic State group, Amaq, said the train attacker in Germany’s Würzburg was an ISIS fighter, according to reports. The attacker, a 17-year-old Afghan refugee, was shot dead by police following the incident late Monday.

UPDATE: 2:40 a.m. EDT — German authorities have found a hand-painted flag of the Islamic State group, also known as ISIS, in the room of the teen Afghan refugee who attacked train passengers with an ax and a knife in Bavaria state late Monday, according to reports Tuesday.

Officials are also investigating claims that the 17-year-old shouted “Allahu Akbar" (God is great) during the attack. He was shot dead by local police.

Original story:

Police in Germany shot dead a teen Afghan refugee after he attacked passengers on a train with an ax and a knife late Monday, officials said. The attack comes at a time when Europe is reeling under the shock of a truck attack that left 84 people dead during Bastille Day celebrations in the French city of Nice.

The ax attack took place in Würzburg in southeastern Bavaria state where the train was running between Treuchtlingen and Würzburg. Three of the victims sustained serious injuries, one suffered minor wounds and 14 others were being treated for shock, according to Würzburg police. Among those injured were four members of a family of five from Hong Kong, the city’s immigration department said.

The 17-year-old Afghan refugee, whose identity has been withheld, tried to flee the scene before police fatally shot him. Officials are investigating claims that the attacker said “Allahu Akbar” (God is great) during the attack. He was carrying “weapons for slashing and cutting” including an ax, German media said.

Bavarian Interior Minister Joachim Herrmann said that the teen lived in the nearby town of Ochsenfurt. The attacker seemed to have traveled to Germany as an unaccompanied minor, Herrmann told public broadcaster ARD. 

“It is quite probable that this was an Islamist attack,” a ministry spokesman reportedly said.

Like most of Europe, Germany has been grappling with the refugee crisis triggered by unrest in the Middle East and Afghanistan. About 154,000 Afghan citizens migrated to Germany in 2015 and of them 31,902 sought asylum in the country, according to an April study by Germany’s Friedrich Ebert Foundation. The rest remained in the country illegally or migrated elsewhere, the report said.

Last Thursday, a Tunisian-born French national mowed down dozens of people with a truck in the southern French city of Nice during Bastille Day celebrations. The attack claimed 84 lives and injured more than 200 people. The Islamic State group, also known as ISIS, claimed responsibility calling the attacker, Mohamed Lahouaiej Bouhlel, one of the “soldiers of Islam.” Bouhlel was shot dead by local police.