A repeat rapist has received an open-ended jail term for attempted sexual violation of a 16-year-old Hutt Valley girl.

But unlike the 15-year-old and 26-year-old Justin Ames Johnston had viciously raped in the early 1990s - for which he spent more than 15 years in jail - the latest victim was not physically harmed.

Her father found Johnston watching her sleepout in the back garden of their home on July 19, 2010, and chased and caught him.

Johnston made the father let him go but police caught him soon after.

Johnston, 43, was not present for his sentencing in the High Court at Wellington this morning, for reasons that Justice Jill Mallon heard in private.

Johnston had also missed most of his sentencing last year on the same charge, however the case had to be run again for reasons that remain suppressed.

In both trials Johnston was found guilty of attempting to sexually violate the girl by unlawful sexual connection even though she was not touched.

Justice Mallon said the family no longer felt safe in the home and cannot live there.

Johnston was freed from prison in 2009 after serving 15 years for two rapes. In 1993 he broke into the home of a 26-year-old woman, threatened her with a knife and raped her.

In 1994 he broke into a home where a 15-year-old girl and her parents were asleep. He put his hands around the girl's neck and forced her out of the house. She was kept for several hours and sexually violated.

The jury at Johnston's latest trial was allowed to hear about those earlier crimes as evidence of an alleged "propensity" or tendency to commit that type of offence. The jury was also told of Johnston talking about abducting a teenage girl and holding her for several days.

Today he was sentenced to preventive detention. Justice Mallon said it would be six years before he could be considered for parole.

Johnston had been assessed as being at high risk to reoffend. The judge said he had a pattern of serious offending, going into homes and subjecting females to prolonged sexual assaults.

He had caused serious harm to the community, and young women specifically, and Justice Mallon said she was satisfied he was likely to commit another similar offence if he was released at the end of a set-term sentence.

Preventive detention can mean jail for life. Even if he is released he would remain on parole for life.

Crown prosecutor Grant Burston said it was one of the clearest cases for a preventive detention sentence.

But Johnston denies he was at the Hutt house to attack the girl. He says he was only going to burgle the garage, his lawyer Val Nisbet said.

"His firm instructions are that it was a sham. He was innocent and he will fight that conviction till the day he dies."

Johnston wanted to make it clear it was not his intention on the night to sexually violate anyone, Mr Nisbet said.

The jury heard evidence that Johnston had been in the area several times before. His car had been seen parked nearby and six cigarette butts with his DNA were found on the driveway between the house with the sleepout and the next door property.