Ahmad A. admitted to murdering a 50-year-old man and injuring six others at a supermarket in Hamburg last year, and has told the court he believed he was carrying out jihad by trying to kill as many Christians as he could.

The failed Palestinian asylum seeker plead guilty to all charges at his trial, which began this week. The lawyer for the migrant said his client acted on behalf of a radical Islamic extremist ideology, saying “He made this decision as a contribution to the global jihad,” Hamburger Morgenpost reports.

The court also heard that investigators had found a homemade Islamic State flag in the asylum accommodation where Ahmad A. lived — a fact which had not been previously made public.

The attack, which occurred in July of last year, shocked Germany, and many debated whether or not the attacker had acted in the name of Islam.

German police were initially hesitant to accept the confession of terrorism by Ahmad A., saying that he suffered from mental illness — despite them admitting he had been a part of the radical Islamic extremist scene previously.

Hamburg Police Tried to Recruit Islamist Supermarket Attacker as Informant

https://t.co/Ib8r8dytBS — Breitbart London (@BreitbartLondon) August 5, 2017

Yassar al-Adaoui Mustafa, a friend of Ahmad A, said that he had rapidly changed around a month before the attack.

“He suddenly prayed loudly in the hallway and was very aggressive. He was shouting at people in English: ‘The West is killing Muslims all over the world’,” he said.

According to the Palestinian, he came to Germany to seek a better life and study dentistry, but could not handle the Western way of life and grew to resent it.

Many also questioned why the 26-year-old had not been deported after his failure to gain asylum status. A report from less than a month after the attack showed that the Federal Agency for Migration and Refugees (BAMF) could have deported him to Norway but they did not file the proper paperwork in time.