A man charged with murdering North Shore teenager Christie Marceau has admitted kidnapping and threatening to rape her before her death.
But Akshay Chand has pleaded not guilty to her murder and is expected to argue insanity as his defence.
Miss Marceau was stabbed at her home in November last year.
At the High Court in Auckland on Thursday morning, her family refused to look at Chand as he pleaded guilty to kidnapping the 18-year-old, assaulting her with intent to commit sexual violation and threatening to cause her grievous bodily harm.
Those crimes occurred in September last year, two months before Miss Marceau was killed.
The court heard that Miss Marceau went to Chand's house because he was threatening to harm himself.
Crown Prosecutor Simon Moore told the court the 19-year-old pulled a knife from his pants and ordered her to remove her clothes.
He read out to the court what Chand said to Miss Marceau.
"If you don't obey me, I'll knife you. You scream, I'll knife you. If you try to escape, I'll knife you. Mr Chand demanded that Miss Marceau remove her clothing ... she refused. Mr Chand said, 'If you don't, I'll knife you.'"
Mr Moore says Chand backtracked about 30 minutes later on his plan to rape her, and let her leave the house.
Miss Marceau alerted a family member once she left.
Chand will be sentenced in October for the crimes he has admitted. There will also be discussion at that hearing about whether he will proceed with an insanity defence to the murder charge.
A Marceau family spokesperson, Ruth Money, says it was hard for the family to hear that the man accused of murdering her had considered raping her in the months before her death.
"It's a terrible thing for victims to go through and hear that but .... it's moving on time now, Move through those charges, and get to the next stage."