A man tried to blackmail his former partner into cleaning his apartment by threatening to post a homemade sex tape online.
Feng Xiao, 21, met the victim while they were studying English at an Auckland language school and they started seeing each other in June 2013.
Recently released court documents showed by December the relationship had soured and the 20-year-old woman moved out of the flat they had shared.
Only days after she had left Xiao, he sent her messages online asking for money to pay for a large phone bill he had racked up making overseas toll calls.
When his ex-girlfriend refused, the defendant told her that unless she gave him $1400 he would post a video of her performing a sex act on him.
Xiao also requested she cleaned the apartment as part of the arrangement and then he sent her a snapshot photo of their sex tape to prove he was serious.
The victim told police about the threat and though she admitted the video had been made with her consent, she said she had certainly not given her ex permission to publish it online.
When interviewed by police, she also told officers about the physical abuse she had suffered throughout the relationship.
The start of their courtship was punctuated by Xiao slapping and punching her in the face and the assaults escalated, the court documents say.
In November, the pair argued at school about the woman allegedly looking at other men.
When they got home allegedly Xiao punched her in the stomach, held a knife to her throat then smashed her over the head with a cup.
Xiao was subsequently charged with three counts of assaulting a female and one of blackmail to which he pleaded guilty at Auckland District Court several months ago.
He was due to be sentenced at his last appearance but he had not allowed probation to check his apartment as a suitable home detention address.
Judge Claire Ryan was unimpressed when Xiao blamed his situation on his lawyer for advising him to plead guilty.
The judge said he would be jailed if he did not change his attitude before sentencing.
"He's going to have to realise the rules of this country apply to him and everybody else," she said.
Xiao will be sentenced at Auckland District Court on Monday.
By Rob Kidd of APNZ