MINNEAPOLIS (AP) — A Minnesota Supreme Court appeals panel has ordered the first full and unconditional release from the state's sex offender treatment program.

Last year, a federal judge ruled that the program was unconstitutional after concluding it was detaining untold numbers of offenders who no longer met the state's criteria for confinement.

The Star Tribune says the ruling Wednesday unconditionally discharges 26-year-old Eric Terhaar from the program. He was spent the past six years in state confinement for sexual acts he committed as a child. The court said Terhaar's need for further therapy could be met in the community, rather than in confinement.

Human Services Commissioner Emily Johnson Piper says the state is discussing options to appeal the ruling. It has 16 days to appeal.