A man sent to prison for beating up his ex-girlfriend had a year shaved off his sentence after evidence showed he was strung out from cannabis withdrawal.
James Kaio assaulted his estranged partner after finding a text message on her cellphone suggesting she was with someone else.
She spent three weeks in hospital and needed six months of home care after the assault, which she had thought would kill her.
Kaio pleaded guilty and was sent to prison for seven years - a sentence which was reduced by the Court of Appeal after evidence from a psychiatrist.
Psychiatrist Grant Galpin, hired by Kaio's defence, said the defendant was having a "major depressive episode" at the time of the attack.
He said Kaio had run out of cannabis two days before the attack, which had contributed to his state of mind along with depression and the relationship ending.
Those factors combined with Kaio's discovery of the text message from another man added to his "sense of worthlessness and panic at the imminent loss of the relationship".
Mr Galpin's medical report stated Kaio "acted out of intense anger" and "was driven by a motive of inflicting pain on the source of his emotional distress at the time".
The assault happened in Putaruru last year after Kaio, then aged 35, and his partner, 21, had separated.
The court file recorded that Kaio had been twice convicted of earlier assaults against the woman when she returned to the house they had shared to pick up some belongings. The visit allowed the couple's two children - who had each stayed with one parent - to spend time together, according to the court judgment.
During the evening, Kaio found a message on her cellphone which drove him to a rage - a message Mr Galpin later said led to the idea "his estranged partner ... had formed an intimate relationship with another party".
His partner tried to leave but was dragged back inside the house by her hair, where she was punched in the head and body until unconscious. The assault continued when she came around, with a phone charger cord tightened around her throat.
Kaio's partner suffered two black eyes, a broken nose and recurring nightmares from a "prolonged, vicious" assault during which she "feared for her life".
The original District Court trial found "no harmful pattern of alcohol or drug abuse", although prison authorities were told Kaio needed rehabilitation desperately.
But lawyer Rob Vigor-Brown took the case to appeal, arguing Kaio's drug abuse and mental health problems had not been considered.
The judges found Kaio smoked about three tinnies of cannabis a day and occasionally used P and Ecstasy.
"He admitted to irritability as a result of running out of marijuana a few days before offending," the judges found.
They found Kaio should have been sentenced to six years. "It is common knowledge that mental disorders are invariably exacerbated by drug use."
The judges warned that the case was an exception - the court would not usually review sentences after hearing psychiatric evidence.
National Addiction Centre director Professor Doug Sellman said three tinnies a day was "a huge amount" of cannabis.
"People who are using three tinnies a day have got past the point of using cannabis to get high. They are using cannabis to feel normal."
He said withdrawal would have created "intense irritability". The text message and depression would have "turbocharged" those feelings.