A former Malaysian diplomat pleaded guilty in the indecent assault case of a New Zealand woman, with a court hearing he burst into her bedroom naked from the waist down, reported AP.

Mohammed Rizalman bin Ismail was a military attache at Malaysia’s Wellington embassy when the incident happened last year, and the case caused outrage when he fled to his homeland citing diplomatic immunity.

Rizalman was eventually extradited to face the New Zealand courts and had pleaded not guilty to attempted rape and burglary. But with his trial due to start Monday, the original charges were dismissed when the 39-year-old admitted one count of indecent assault against Wellington woman Tania Billingsley.

Rizalman’s lawyer Donald Stevens cited extenuating circumstances including mental illness, although prosecutors contest this.

The court heard that on May 9 last year Rizalman arrived at Billingsley’s Brooklyn flat, took off his pants and underwear before entering through the unlocked front door while she was in her bedroom watching a movie on her laptop.

He took off his jacket in the kitchen before knocking on her bedroom door and asking if he could come in.

Billingsley looked up to see Rizalman naked from the waist down and began screaming at him to leave.

Rizalman grabbed her by the shoulders with both hands and struggled with her until she managed to push him into the living room, then out of the flat before locking him out.

Alarmed by her screams, a neighbour called a boyfriend of Billingsley’s flatmate, who lived nearby.

The boyfriend arrived to see Rizalman, now wearing pants, standing in front of the flat and spoke to him briefly.

Rizalman left and was arrested by police soon after.

“The victim was entitled to be very, very frightened at the situation confronting her,” Crown prosecutor Grant Burston said.

Defence counsel Donald Stevens QC said there was “no real dispute” as to what happened. “Rizalman has accepted there was an indecent assault because he went into the house without his underpants on.”

He denied that Rizalman’s act was sexually motivated.