Pages from a notebook found at the home of an Afghan teen who attacked passengers on a German train with an ax may be regarded as a suicide note, police and investigating officials said during a press-briefing on Tuesday.

Addressing his father, the young man asked him to pray that he could take revenge "on the infidels" and "get to Heaven," officials said.

The train attacker was "a devout Sunni," according to officials, who added that he didn't visit a mosque regularly, but had probably prayed privately. Having studied the man's presence on social networks, investigators said he had published a post against "enemies of Islam" some 24 hours before the attack.

Read more

One of the perpetrator's friends, with whom he often spoke by phone, had recently died in Afghanistan, the media were told, with investigators adding that it may have been a trigger for the assault.

Investigators said they were in possession of a video, the content of which was being "analyzed." Earlier on Tuesday, Amaq news agency, affiliated with Islamic State (IS, formerly ISIS/ISIL) released a video allegedly showing the ax-wielding attacker. Identifying him as Muhammad Riyad, IS called him a "soldier of the Caliphate."

In a screenshot from the video which is circulating on social media a young man, whose identity cannot be immediately verified, is seen wielding a knife. In his speech, he reportedly claimed he would use the weapon in a slaughter to avenge the killings of people in Muslim countries and called on others who couldn't reach IS strongholds in Syria and Iraq to conduct attacks in their own countries.

The now-confirmed evidence that the teenager shouted “Allahu Akbar” (God is great) as he charged at his victims with an ax on the train was "a first clue" of his possible connection with radical Islam, the officials said. However, they again warned the media against "premature judgments" before the investigation is concluded.

READ MORE: Over half of Europeans link terrorism to refugee influx – PEW survey

The attacker was a 17-year-old Afghan refugee who arrived in Germany last summer as an unaccompanied minor. At the time of the attack he had been living with a foster family in Wurzburg.

The attack on the train in Bavaria left five people injured. Two people remain in a critical condition.