say the attacker seemed to have a 'political motivation'

A man screaming 'Allahu Akbar' killed one passenger and seriously injured three more after knifing them at a commuter train station in Germany on this morning.

The attacker, aged 27, is said to be a young German man and not an asylum seeker as earlier media reports suggested.

The male victim, aged 56, died after the random attack at Grafing station not far from Munich earlier this morning and was assaulted as he boarded the carriage.

Scroll down for video

Investigators probe the crime scene where a 27-year-old man attacked four passengers at Grafing station near Munich leaving one dead and three injured

Bloody footprints could be seen leading from the train and on to the platform at Grafing station this morning

Investigators take pictures of evidence on the pavement outside the station following the stabbing

The attacker first knifed a newspaper seller in the back, shortly before 5am. He then struck out at three more victims, aged 43, 55 and 58, before running away.

He was caught a few feet from the station entrance and is now in custody after being overpowered at the scene. Of the three surviving victims, one is said to be seriously hurt.

Before the attack, the man, who apparently had a history of drug abuse, had taken off his shoes because he believed them to be infested with bugs which he blamed for the blisters on his feet.

At the scene, police forensic experts in white overalls marked more than 40 bloody footprints - some of them barefoot - on the train platform with chalk numbers and collected evidence, including a mobile phone that was pulled from the gap between the train and platform.

German media said police had arrested the perpetrator with the prosecutor adding he had an 'apparent Islamist' motive.

Police also collected evidence from the platform including a mobile phone that was pulled from the gap between the train and platform

Parts of the station remain cordoned off by police with a bicycle lying on the ground close to the station's exit

Police officers stand guard outside a restaurant near the station in Grafing where four people were attacked

The scene outside Grafing station near Munich in Germany, where a man stabbed several passengers waiting for a commuter train leaving one victim dead

The attacker was overpowered at the scene and the station sealed off. The attack occurred shortly before 5am

However, police later said he was not linked to an Islamic extremist network or had any accomplices.

He was later identified as Paul H, an unmarried carpenter, who had been on unemployment benefits, who comes from the town of Giessen in Hessen.

He had received psychiatric treatment just two days ago and has confessed to using drugs, investigators said.'From what we know so far, he was a lone criminal ... There is no indication that he was part of an Islamist network,' Petra Sandles, vice president of Bavaria's office of criminal investigations, told reporters.

Investigators said it was unclear why the man, who had spent the night at the railway station, had chosen Grafen, a quiet commuter town about 20 miles southeast of Munich for the indiscriminate attack.

Authorities also say they are doubtful as to whether the suspect can be held criminally responsible.

This suggests that the man may not be mentally fit to stand trial.

Prosecutor Ken Heidenreich said that the man's statements do not fit together.

Grafing is on the outskirts of Munich. The passengers were waiting for a commuter train when the attack happened

Officials say there appears to have been no particular reason for the man to choose the Grafing Bahnhof station as the location for his attack.

They say he caught a train there from Munich in the early hours of the morning.

The mayor of Grafing, Angelika Obermayr, said: 'The idea that people go on a beautiful morning go into the S-Bahn station or sell newspapers there and then become victims of a madman is just terrible.'

While Karl-Heinz Segerer, a spokesman for Bavaria's state criminal police officer added: 'Witness questioning shows that there were politically motivated comments on the perpetrator's part.

Bavaria's top security official, Interior Minister Joachim Herrmann, said officials also will look into whether he was mentally disturbed, 'perhaps because of drug addiction.'

Germany has lost hundreds of young men who left the country to join the ranks of ISIS in Iraq and Syria.

The country's intelligence agencies have warned in recent months of the need for increasing vigilance as terrorists plot to export Parisian-style terror to Germany.

Police said they could not rule out a 'political background' to the attack at the train station, pictured, but have not released further details

The attack took place at Grafing station, pictured. Bavarian Radio broadcast that the attacker was a 'young German man not previously known to police

The country has also been playing a supporting role in the fight against ISIS, but has not suffered a major attack by Islamist militants the like of which neighbouring France and Belgium have experienced.

However, two railway station in Munich were temporarily evacuated on New Year's Eve after a terror alert over an alleged suicide bomb plot by ISIS.

Last August, two German-speaking jihadists claiming to belong to the Islamic State jihadist group threatened Germany with attacks in an online execution video, urging their 'brothers and sisters' in Germany and Austria to commit attacks against 'unbelievers' at home.

Grafing is the largest town in the upper Bavarian district of Ebersber. The station was sealed off and the investigation into the perpetrator has been taken over by the local state criminal office.