BERLIN (AP) — A German court convicted a man of attempted murder and bodily harm and sentenced him to 14 years in prison on Friday over a knife attack on a train last year that left four people wounded. Judges found that he had an Islamic extremist motive.

The 28-year-old Palestinian man who grew up in Syria, identified only as Abdalrahman A. in line with German privacy rules, was convicted at the Munich state court.

German news agency dpa reported that prosecutors, who argued that there was an Islamic extremist motive, had called for a life sentence while defense lawyers argued that their client was a paranoid schizophrenic who couldn’t be held criminally liable and called for his acquittal.

Judges concluded that the defendant had a “jihadist-Islamist motive” and had attempted to kill non-Muslims, a court statement said. They weren’t convinced that he had mental health issues at the time that would have influenced his criminal liability and said the man’s claims about such health problems were contradictory, variable and not credible. Three experts also found no evidence of a “relevant” mental illness.

The attack took place on an ICE high-speed train traveling from Passau, on the Austrian border, to Hamburg on Nov. 6, 2021. Authorities initially said that the man attacked his victims apparently at random and showed signs of mental illness, but that there was no immediate indication of a terror motive.

Prosecutors later said that Islamic State group propaganda videos had been found on the suspect and that material on his Facebook account also pointed in that direction.

Police have said that the suspect came to Germany in 2014 and was granted asylum in 2016. He had been living in Passau.

The train stopped at Seubersdorf, between the Bavarian cities of Regensburg and Nuremberg, after the attack and investigators said the suspect was arrested quickly and without resistance.