A Somalian refugee who went on a frenzied knife-wielding attack in Christchurch said he was "possessed by the devil".
Zakariye Mohammed Hussein, 27, was shot by police after he stabbed a delivery driver and a city council worker on March 15. He has been sentenced to six and a half years imprisonment.
He admitted a raft of charges including unlawful possession of a weapon, kidnapping, wounding with intent to cause grievous bodily harm, and injuring with intent to cause grievous bodily harm.
He was sentenced in Christchurch District Court this afternoon and will be eligible for parole when he has served half of sentence.
Hussein's lawyer Allister Davis said his client was genuinely sorry for what he had done.
"He's full of remorse, he doesn't know what's caused this," he told the court.
"As he has described to the clinicians and myself on numerous occasions he felt he was possessed by the devil."
Davis described his client as a "quietly spoken, shy, reserved polite man who doesn't want to get into any difficulties," but who had a troubled past and was on medication for psychiatric problems.
"He and his family had enjoyed a good life in Somalia but when civil war broke out they fled," he said.
"He has seen his uncle shot dead in front of him, left on the front doorstep. He's seen sights that you and I can't bear to think about - women violated, people being shot, bullets around every corner."
Hussein and his family had spent three years in a refugee camp before moving to New Zealand, and he had a clean record until March 15.
Davis said his client had left home the night before armed with two knives and camped out in the grounds of Redwood School after suffering some sort of breakdown.
He said his client had not been taking his medication for "some time" and "when he woke in the morning he had no idea why he had done what he had done, he was in a catatonic state where he said he was possessed by the devil."
The school's caretaker found Hussein and was threatened with a knife before the offender hijacked a pie delivery van which was dropping off an order at the school.
Hussein forced the driver, Marteine Robin, to drive to Hoon Hay Road at knifepoint and stabbed her in the shoulder before getting out of the truck and confronting other motorists.
A 50-year-old council worker attempted to intervene but was also stabbed by Hussein, before a group of men, one carrying a crowbar, confronted him.
Police arrived, but Hussein refused to drop his knives and was Tasered and pepper sprayed before rushing at officers, one of whom opened fire with a pistol and shot him in the arm.
Davis said his client spent several weeks in hospital after being shot and was still unable to use his arm.
Psychiatric tests were carried out on Hussein while he was in custody which found that he was fit to plead to the charges.