A Syrian man was sentenced to life in prison on Friday for murdering a tourist and seriously injuring another in an Islamist-motivated knife attack in the eastern German city of Dresden last year, the court said.

The man, identified as Abdullah A. H. H. under privacy laws, was found guilty of murder, attempted murder and grievous bodily harm, a spokeswoman for the Higher Regional Court in the state of Saxony said.

He would have to spend at least 15 years behind bars, the spokeswoman added.

At the start of the case, prosecutors said the 21-year-old man had intended to kill both men in the attack on Oct. 4 because he saw them as “infidels”.

The Syrian man had come to Germany in 2015 along with thousands of his countrymen who had fled the civil war.

Authorities stripped him of his refugee status after he was sentenced to more than two years in prison for terrorism activities in 2018 in a separate case.

Security officials said he had been classified as a radical Islamist and was under observation on the day of the knife attack.