A repeat sex offender who planned an attack on an Upper Hutt teenager has been jailed indefinitely.
Justin Johnston was sentenced to preventive detention by Justice Kos in the Wellington High Court on Thursday on charges of attempted sexual violation and threatening to do grievous bodily harm.
The 41-year-old was arrested in July 2010 after a man found him in his backyard in Upper Hutt. The man's 16-year-old daughter was alone in a nearby sleepout.
Johnston had been jailed between 1994 and 2009 for two earlier sex attacks on a woman and a teenaged girl.
Defence lawyer Janine Bonifant said her client's offending was at the lower end of the scale, as there was no contact at all between him and his young victim.
She submitted that a finite jail term, followed by an extended supervision order would be an appropriate sentence.
But Justice Kos said Johnston had been assessed as having a high risk of reoffending and the indefinite jail term was needed to protect the community and set a minimum jail term of six years.
The judge warned Johnston his latest offending counts as a first strike offence under the three strikes legislation and it has had a profound psychological effect on the family.