ISIS murderer Jihadi John was an “inspiration” to the man who launched a machete attack on an Asian dentist in a supermarket.

Zack Davies, who shouted “white power” during the attack, had posted Facebook posts from the Koran, a crown court heard yesterday.

Less than an hour before the assault Davies – who admitted he sometimes spent up to six or seven hours a day playing violent video games – had looked up a website about the Koran and beheadings.

Zack Davies who hit his victim with a hammer and machete, causing serious injuries, had used the Facebook name Zac Ali – Ali being the name of the nephew of the prophet Mohammed and a central figure in Shia Islam.

Cross-examining Davies, Sion ap Mihangel, prosecuting, said: “One of the words you looked up before you went out of the house that day was ‘beheading’.”

Davies said: “I got very fascinated by Jihadi John and was inspired by him.”

Prosecutor: “Jihadi John was your inspiration?”

Davies: “I even had a mask.”

He said he had thought about wearing the mask and attacking his mother’s boyfriend shouting out during the attack “Allahu Akbar”. (God is great in Arabic).

Mr ap Mihangel: “At the time you left the house did you think about beheading someone?”

Davies: “I thought about hurting someone.”

Mr ap Mihangel: “You were trying to behead Dr Bhambra when he was on the floor?”

Davies: “No.”

The court heard how Davies had spent a long time looking at extreme websites, including executions carried out by Isis and crimes including dismemberment.

Other sites included one called “I want to kill myself” and Davies said he had suicidal thoughts.

But Davies told the court he had no intention of killing Dr Bhambra. “I think it was just an act of desperation. I just snapped.

“I am disgusted with myself and ashamed. How could I have done that to someone? But it happened and I wish it hadn’t. I feel very bad about it.

“It would be very difficult for him (Dr Bhambra) because he probably has a lot of anger towards me, but I would say he has to let go of that anger because it has destroyed me.

“My actions are disgusting and can never be justified.”

Asked why he had used the words “white power” and “Lee Rigby” [a guardsman murdered outside Woolwich Barracks in South London] during the attack, Davies said: “I feel disgusted, especially bringing Lee Rigby’s name into it and I would like to apologise to his family. It can never be justified.

“I would like to apologise to Dr Bhambra. Because of me he has been through this ordeal.

“I am here now and justice will be done and I hope he can be satisfied with that.”

After watching violent video games Davies said he felt “desensitised” to violence.

Mr ap Mihangel said: “You were fascinated by violence.”

Davies: “At the time yes. I had been following Isis for a long time.”

Mr ap Mihangel: “You had a keen interest in Isis?”

Davies: “I was absolutely fascinated.”

Mr ap Mihangel: “Did you agree with their methods?”

Davies: “The concept of no compromise was interesting.”

Mr ap Mihangel put it to him:“You are a racist at the end of the day.”

Davies replied: “I don’t think it is that clear cut. I had contradictory extreme views, especially with my interest in Isis and National Socialism.”