The man who stabbed several people with a knife on a regional train in North Rhine-Westphalia on Friday and injured three of them is mentally ill, according to the Aachen public prosecutor.

The cause of the attack was “with a high probability of a psychotic experience,” said the public prosecutor on Saturday. The district court of Aachen ordered provisional accommodation in a psychiatric hospital. The public prosecutor’s office emphasized on Saturday that there was no evidence of a terrorist background or a religious radicalization of the suspect.

The 31-year-old tried to get off the train on Friday morning in the regional express from Düsseldorf to Aachen shortly after the stop in Herzogenrath. When he failed, he suddenly hit a passenger in the face with his fist, the prosecutor said.

He then pulled out a kitchen knife and stabbed himself with it indiscriminately. A man from Nigeria, injured himself, brought the attacker to the ground and disarmed him. Other passengers, including a federal police officer on his way to work, came to the rescue.