BERLIN (Reuters) -A knife attack on a train in Bavaria on Nov. 6 which left several people injured is being investigated as terrorism related, prosecutors in Munich said on Tuesday.

An initial evaluation of social media accounts of the suspect, who was arrested at the time, showed that an Islamist motive for the crime could not be excluded, said the prosecutors, adding they were looking at all possibilities.

A man had injured four people when he attacked passengers in the train from Passau to Hamburg with a knife. Some of the injuries were serious.

Initially, investigators had believed that the man had psychological problems. Prosecutors said experts are still assessing whether his condition means he has only diminished culpability due to his condition.

(Writing by Madeline Chambers, editing by Thomas Escritt, Kirsti Knolle)