The Crown has defended its handling of the trial of a repeat sexual predator jailed indefinitely after stalking a teenage girl.
In 2011, a jury found Justin Johnston guilty of attempted sexual violation and threatening grievous bodily harm, but on Wednesday he appealed against his convictions and sentence.
Johnston spent 15 years in jail for earlier sex attacks and in July 2010 was arrested after being found in an Upper Hutt backyard, where a 16-year-old was alone in a nearby sleepout.
His lawyer told the Court of Appeal on Wednesday there was no direct evidence that Johnston knew there was a teenager in the sleepout and the Crown's case was flawed.
However, Crown lawyer Cameron Mander said the prosecution case was based on circumstantial evidence, which required the jury to consider several pieces of evidence in reaching a decision on Johnston's guilt or innocence.
The court has reserved its decision.