Just hours after a 17-year-old Afghan refugee attacked passengers with an ax and knife on a train in Germany on Monday night, AP reports ISIS has claimed responsibility. This is likely not a surprise to many as a witness said that the attacker was shouting 'Allahu akbar' during the attack and Joachim Herrmann, Bavaria's interior minister, told ZDF Television "during a search of his room, a hand-painted IS flag was found."

As AP details,

The Islamic State group has claimed responsibility for an attack on a train in Germany that injured at least five people. The claim was posted on the group's Aamaq news agency on Tuesday. It came hours after a 17-year-old Afghan asylum seeker attacked passengers with an ax and knife on a train near Wuerzburg-Heidingsfeld on Monday night, before he was shot and killed by a special police unit which happened to be nearby. The statement says the attacker was "a member of the Islamic State" group and carried out the attack in response to the militant group's calls to attack countries that are members of the anti-IS coalition. "Even during the first emergency call, a witness said that the attacker was shouting 'Allahu akbar' on the train," Joachim Herrmann, Bavaria's interior minister, told ZDF Television. "Also, during the search of his room, a hand-painted IS flag was found."

Herrmann said that it was too early to draw conclusions about the attacker's motive.

The bloody scene of the latest terror attack in Europe...

As WSJ reports, unlike France and Belgium, Germany has avoided deadly Islamic State-inspired attacks (until now) even as authorities have warned that the stream of refugees and other, often undocumented, migrants that have poured into the country presented a security risk. Roughly a million people arrived in Germany last year to request asylum, many of them from Syria, Iraq and Afghanistan.

The attacker, who was not identified by the authorities, came to Germany two years ago as an unaccompanied minor, and applied for asylum in March of last year. He lived in a home for young refugees until two weeks ago when he was placed with a foster family in the Wuerzburg area. Investigators were talking to the foster family, witnesses and the attacker's friends.

But now ISIS has claimed responsibility...

And if the motive is confirmed, the incident would represent the most significant such attack in Germany since a Kosovar gunman killed two U.S. servicemen in 2011.

The attack is likely to add fuel to an intense debate across Europe on immigration, Islam and how to respond to the wave of people from the Middle East, Africa and elsewhere seeking refuge on the continent. While Germany initially welcomed hundreds of thousands of people last fall, Chancellor Angela Merkel has since scrambled to limit the flow and her ratings have suffered. Anti-immigrant populist parties in France, Austria, the Netherlands and elsewhere have seized on the migrant influx to argue that their countries’ mainstream politicians are out of touch with people’s fears.

In Germany, the upstart Alternative for Germany party has posted a string of regional election victories in the past year, seizing on the sexual assaults by migrants in Cologne on New Year’s Eve as proof that Ms. Merkel’s policy was endangering the country. The Cologne assaults, in which authorities said at least 2,000 mostly north-African men assaulted more than 1,200 women, raised fears among Germans about taking in more migrants.