A man with a history of rape has failed in his last-ditch attempt to overturn an indefinite prison sentence.
In a judgment released this morning, the Supreme Court rejected Justin Ames Johnston's appeal against a conviction for attempting to violate a 16-year-old schoolgirl.
Johnston is serving a sentence of preventive detention, meaning he could stay in jail for the rest of his life if the Parole Board thinks he's a risk to the public.
At a trial in Wellington, Johnston, now in his mid-40s, was found guilty of attempting to violate the girl.
Her dad discovered Johnston in the backyard of their Upper Hutt property, where the teen was alone in a sleepout.