One person was killed and three others were injured Tuesday morning when a knife-wielding man attacked people indiscriminately at a commuter rail station outside Munich, Germany.

The attack happened in Grafing, about 20 miles east of Munich, shortly before 5 a.m. (11 p.m. ET Monday). The Munich newspaper Merkur reported that the attacker, carrying a four-inch knife, stabbed one man on a train, a second man in the station forecourt and two other men who were passing by on bikes.

Investigators told the Suddeutsche Zeiting newspaper that witnesses had reported that the attacker had shouted "Allahu Akbar!", the Arabic phrase meaning "God is Great!" during the assault. Merkur reported that the suspect had yelled, "You infidels!", among other statements.

Despite reports of the man's shouts, German authorities reportedly said they did not have any evidence linking the man to ISIS. The man is believed to have mental health and drug problems.

Police spokesman Karl-Heinz Segerer said the assailant, who was arrested at the scene, "expressed political motivations" during the attack but didn't give details. Bavaria's top security official, Interior Minister Joachim Herrmann, said officials also will look into whether the assailant was mentally disturbed.

Segerer said the suspect was a 27-year-old German national who does not live in Bavaria, the region where the attack took place. The broadcaster Bayerische Rundfunk reported that the suspect had no prior criminal history.

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

The Suddeutsche Zeitung reported that the victims were aged between 43 and 58 years old. The deceased victim was identified as a 50-year-old man from the town of Wasserburg, about 35 miles east of Munich.

"The idea that people enter [the station] on a beautiful morning ... and then become victims of a maniac is terrible," said Grafing mayor Angelika Obermayr. "I am most grateful for the police, doctors, paramedics and our firefighters who were quickly on the scene."

The main entrance to the station was closed while the investigation was ongoing and significant delays were expected. At least one platform was expected to be closed until midday.

The Associated Press contributed to this report.

Click for more from Suddeutsche Zeitung.