Jiaxin Tu crept into the bedroom of the woman he was obsessed with and hammered her new boyfriend to death, in an act that has now been ruled murder by a majority jury.
The young woman slept through the killing and only awoke as Tu tried to get into bed next to her. She yelled out for her boyfriend, Shane Hawe-Wilson, to help - but he was dead.
Today, a jury in the High Court in Auckland found Tu, also known as Max Tu, guilty by a majority of 11 to one of murdering Mr Hawe-Wilson at their flat in the Auckland suburb of Panmure last July.
The Crown said Tu acted out of jealousy, but his lawyers argued he was suffering a disease of the mind and had no idea of right and wrong.
In her closing address to the jurors yesterday, Crown prosecutor Kirstin Lummis said there was evidence Tu had used his mental health as an excuse for bizarre behaviour in the past.
She said sometime before the killing he had told the father of the woman that he could get away with murder and he would only end up in the "nuthouse".
Ms Lummis also gave examples of Tu's obsession with the teenage girl, who was half his age. On one occasion he spent the night outside her house yelling her name.
There were also Facebook messages, where he called her "my girl" and told a friend that he wanted to marry her.
He even hired a hitman to get rid of her former boyfriend. The hitman did not go through with the job.
Ms Lummis said, following the murder, Tu had asked ambulance officers if the police were coming and Ms Lummis said that showed he knew he had done something wrong.
In his closing address, Tu's lawyer Peter Tomlinson said his client had suffered a mental collapse and had been admitted to mental health institutions a number of times in the years leading up to the killing.
He said Tu had made unusual demands of the police, including asking them to find him a woman.
By 2015, Tu's mental state was deteriorating - he had been kicked out of home and his world had fallen apart. He had moved in with Mr Hawe-Wilson and Mr Hawe-Wilson's girlfriend - the woman he was obsessed with.
But Mr Tomlinson said because of Tu's schizophrenia and autism, he perceived his life was under threat from Mr Hawe-Wilson.
He said that after the killing, Tu had waited for the police to arrive, was open and naive during his interview with detectives, and even asked for a lift home.
Mr Tomlinson said the only way to rationalise his behaviour was if he was insane at the time.
But at the end of the three-week trial, the majority of the jury disagreed after deliberating yesterday afternoon and today.
It had been a long day for the Hawe-Wilson family, who sat in the public gallery. One of them clapped as the verdict was read out.
Outside court, Mr Hawe-Wilson's father Shane Wilson told RNZ News the family were relieved with the verdict.
Mr Wilson described his son as an outgoing young man who was willing to give anything a go.