It meant he could not be released until the parole board was satisfied he did not pose a significant risk to the community.
But yesterday, at the Court of Appeal sitting in Christchurch for the first time since the magnitude-7.1 earthquake of September 4, 2010, Leonard made a case against his preventive detention sentence.
Defence counsel Anne Stevens said sentencing judge Justice John Fogarty had failed to consider a lengthy determinate, or finite, term in prison.
The judge had focused only on whether Leonard would commit another sexual or violent offence and had not considered that a lengthy determinate sentence would be preferable if it gave the public adequate protection.
In the year before his release from prison, clinical psychologists deemed Leonard a high risk of reoffending.
They expressed particular concerns over his fetishes and fantasies, as well as an openness of the sexual gratification that arose from his offending.
But there had been little focused work done on his deviant sexual arousal, Mrs Steven said.
The High Court in Dunedin heard that Leonard had gone to the park, armed with a knife, with the intention of finding a female to rape because he could not "get a missus''.
From early childhood, he had behavioural problems including impulsive oppositional behaviour, speech difficulties and, aged 13, was diagnosed with oppositional defiant disorder.
At 15, he was referred to Child, Youth and Family because his parents were concerned about his violent outbursts, including assaulting his mother.
He was later referred to mental health and alcohol services in Dunedin and Timaru.
After raping and threatening to kill a Geraldine woman at knifepoint in her own home in March 2005, he was jailed for nine-and-a-half years.
While in jail, he received psychological treatment from 2009 until his release in May last year.
A determinate sentence, in the order of four years, six months, would allow Leonard to undergo high-risk sex offender programmes straight away, which he'd expressed a desire to comply with, Mrs Steven said.
Under the preventive detention, he would not be eligible for such programmes until his five-year sentence was up.
"In a sense, it'll be five years lost,'' Mrs Stevens said.
"He's not only willing, but he's shown an ability to change.''
Crown prosecutor Marie Grills said there needed to be an "alteration in his thinking'' before Leonard could receive such treatment.
The three Court of Appeal judges, Justice Mark O'Regan, Justice Graham Panckhurst, and Justice Alan MacKenzie, reserved their decision.