Berlin - German authorities cast doubt on Wednesday on whether a teenager who went on an axe rampage on a Bavarian train was really an Afghan refugee, saying he might have been from Pakistan.Interior Minister Thomas de Maiziere said the teenager was believed to be a "lone wolf" attacker who appeared to have been "inspired" by the Islamic State group but was not a member of the jihadist network. "This is perhaps a case that lies somewhere between a crazed rampage and terrorism," de Maiziere told reporters. He said investigators were still trying to determine the true identity of the 17-year-old who was shot dead by police following the train attack in which he injured five people, two of them critically.The Islamic State group released a video on Tuesday purportedly featuring the assailant announcing in Pashto he would carry out an "operation" in Germany, and presenting himself as a "soldier of the caliphate".German authorities said they had authenticated the video featuring the teen identified in media reports as Riaz Khan Ahmadzai.However, security service sources now think he might have pretended to be Afghan on arrival in Germany in 2015 in order to have a better chance of securing asylum, ZDF public television reported.In the ISIS video the youth uses phrases of a dialect of Pashto spoken in Pakistan - not Afghanistan - and experts have indicated that his accent is also clearly Pakistani, ZDF said. A Pakistani document was also found in his room.Distress as trigger? De Maiziere noted however that both Afghanistan and Pakistan had Pashtun communities and said German authorities had received an application for family reunification from the teenager for relatives in Afghanistan.He added that investigators were also looking closely at accounts from the assailant's foster family that he received a phone call on Saturday informing him of the death of a friend in Afghanistan and whether his apparent distress over the news was a possible trigger for the attack.Authorities on Tuesday found a hand-painted ISIS flag and what they called a suicide letter addressed to his father among the attacker's belongings.Federal prosecutors said in a statement they would probe the extent of the teenager's links with IS.Locals described the assailant as "calm and even-keeled" and a "devout Muslim who did not appear to be radical or a fanatic", according to Joachim Herrmann, interior minister of Bavaria state. Police however said he wrote in the letter that the world's Muslims "must defend themselves". "Now pray for me that I can take revenge on non-believers, pray for me that I can get to heaven," the note said.Authorities said he shouted "Allahu akbar" (God is greatest) three times as he rampaged through the carriage.Brutal ordeal Germany has thus far escaped the kind of large-scale jihadist attack seen in the southern French city of Nice last week, in which 31-year-old Mohamed Lahouaiej Bouhlel used a truck to kill 84 people.That attack was also claimed by ISIS without the assailant having clear ties to the group.A record 1.1 million migrants and refugees were let in to Germany last year, with Syrians making up the largest group followed by Afghans. The assailant had arrived as an unaccompanied minor in Germany in June 2015 and had been staying with a foster family in the region of the attack for the last two weeks.Herrmann on Wednesday revived calls by his party, the conservative Christian Social Union, to impose an upper limit on refugees. However Chancellor Angela Merkel's spokesperson also called the Wuerzburg attacker a "lone wolf" and said his actions did not justify "discrediting a large group of people". Meanwhile a family of tourists from Hong Kong hurt in the assault gave graphic details of their ordeal.The elder daughter of the Yau family told local media that her parents tried to defend her sister's boyfriend when the axe-wielding teenager attacked him. "Originally the assailant was attacking my sister's boyfriend and when my mother and father saw, they went up to get in the way and then they got injured," Sylvia, 30, told the Hong Kong-based Apple Daily newspaper.Her father and sister's boyfriend are now in intensive care with serious head injuries. Her sister Tracy, 26, and mother, 58, were also injured, while Sylvia's 17-year-old brother was unharmed.