A sex offender will be monitored by authorities for 10 years "for his own safety" once he is released from prison.
Graham Martin Hulks was sentenced to two-and-a-half years in prison after being found guilty of four charges of sexual misconduct against children in 2010.
But he must be released in March next year.
Hulks appeared in the High Court at Auckland today where Crown prosecutor Anna Longdill successfully argued that Hulks needed to be subjected to a 10-year extended supervision order.
Justice Graham Lang told Hulks that if he reoffended against children then he would be a "prime candidate" for preventative detention.
"As you understand, that is an indefinite sentence which could last for the rest of your life."
Hulks nodded while Justice Lang continued.
"You need all the help you can get and all the oversight you can get to ensure you do not offend again."