Illegal sex has never been far away in the life of 63-year-old Hastings man Douglas Harold McInnes - when he's not in prison.
So when a court order blocked him from getting too close to children, he wooed a 29-year-old woman with a reading age of 7, put her on a contract to keep it a "secret deal for life", and awarded her points for the sexual acts he wanted.
It happened while he was on an extended supervision order targeting protection of children, in light of previous convictions dating back to 1966 - when he was 14 - but yesterday in the High Court in Napier Justice David Collins said evidence and reports after the latest offending highlighted McInnes was a high risk to any group of vulnerable females.
With defence counsel Matthew Phelps accepting that a prison sentence of at least five years was likely, Justice Collins accepted Crown prosecutor Rebecca Guthrie's call for preventive detention, meaning McInnes might never be released.
He will serve a minimum five years in jail before he can be considered for release, which can only be done with significant treatment and assessment, and evidence that he would no longer be a risk. But according to one report before the judge, McInnes had said that if he was sentenced to preventive detention he would "give up" and not take part in the programmes required for his release.
McInnes denied the latest offending, claiming sexual advances had been made by the woman, who lived with her husband who was also impaired.
But in Napier District Court in July he was found guilty on four charges of sexual exploitation and abuse of a female with significant impairment, for repeated offences over several months at several locations, including the woman's home, and his own home where he lived with his ex-wife.
Justice Collins was told McInnes grew up amidst violence and sexual offending, went into welfare where he was also abused, and was sexualised well before he was 14, when he went into detention for two years for assaulting and indecently assaulting a girl in her young teens.
Three years later he was found unfit to plead on charges of committing indecent acts with girls aged under 10. In 1974 he was jailed for more offences against a young girl, and in 2002 he was sentenced to six years' jail for offences on a girl which started when she was aged 7.
In the latest events he had befriended the victim and her husband, to the extent they had some reliance on him. Feeling governed by the contract, she kept the secret until she told her pastor, saying she could not lie in church.
Police could not find the contract said to have been signed by the woman but in McInnes' home they did find a draft document consistent with what they had been told.