Berlin: A German man suffering from psychiatric problems stabbed four people at a train station near Munich, killing one man and wounding three more in an attack investigators said did not appear to be politically motivated.

Witnesses said the alleged assailant, a 27-year-old unemployed carpenter, attacked his first victim shouting "Allahu Akbar" ("God is Greatest" in Arabic). Some witnesses said they also heard him shout "infidels must die".

The man received psychiatric treatment just two days ago and has confessed to using drugs, investigators said. He was arrested at the scene and was being questioned.

"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.