The man apprehended is said to be a German national who was not known to police
A 50-year-old man who was critically injured after a stabbing at a railway station near Munich has died in hospital.
Three other commuters were also wounded in Grafing by a man who was reportedly shouting "allahu akbar" during the attack, which means "God is greatest" in Arabic.
Forensic experts have cordoned off the platform where the stabbings took place, which was covered in bloody footprints.
It is believed the 27-year-old suspect, who was arrested at the scene, had used a knife with a 10cm blade.
Prosecutors have said the alleged attacker is not co-operating with the police, and a spokesman added: "The assailant made remarks at the scene of the crime that indicate a political motivation - apparently an Islamist motive."
The man apprehended is a German national who was not known to the police and did not live in the region.
German media outlets are reporting the name of the suspect as Paul H. from Hesse - a state in central Germany which is around 320km away from Munich.
It is believed all of those injured in the stabbing, which occurred shortly before 5am (4am Irish time), were men.
The three commuters who were wounded were 43, 55 and 58 years old.
Initial reports from a Bavarian radio station suggested the four victims had been left with life-threatening injuries.
At least one platform at Grafing Bahnhof station will remain closed until lunchtime at the earliest, and the incident has caused delays across the city's railway network.
"There is no longer any threat to the population," said Michaela Gross, a police spokeswoman.