BERLIN (AP) — A 27-year-old Palestinian man has been convicted of murder and attempted murder for killing one person and wounding six others in a stabbing spree at a German supermarket last summer.

The dpa news agency reported Thursday that Ahmad Alhaw received life in prison for the July attack in Hamburg that he told authorities he saw as his "contribution to a worldwide jihad."

The rejected asylum-seeker, who was born in the United Arab Emirates and arrived in Germany in 2015, wasn't found to have any links to extremist groups like the Islamic State.

Alhaw, who confessed to the crimes during his trial, told authorities that he decided on the day of the attack to kill Christian Germans indiscriminately, citing tensions at the time over a contested Jerusalem holy site as his motivation.