SANTA ANA (CBSLA.com) — A former Orange County physical education teacher who molested more than a dozen students is set to be released from custody after more than 20 years.

A Santa Ana judge made the decision for Alan Rigby, 66, to be freed from Coalinga State Hospital by Sunday.

“The terms of his release are unconditional, which means there will be no supervision,” Orange County Deputy District Attorney Shannon Back said.

Rigby molested at least 17 students, most of them boys, while he worked as a P.E. teacher at Harbor Day School in Newport Beach in the 1980s.

In addition to committing sex acts in front of children, Rigby was convicted of lewd acts on a child with force.

“He convinced students to participate in what he called an initiation, which involved a sexual act to become part of a club that he represented existed to them. It was a secret club,” Back said.

When Rigby was sentenced, he insisted he was not guilty. He served 50 percent of his prison term and was moved to a state hospital.

Back said during his time there, he wrote a book criticizing his sex offender-treatment program, calling it a “joke.”

The prosecutor, who fought to keep Rigby locked up, believes that the convicted molester has the propensity to sexually assault children. She said he was diagnosed with pedophilia, which can’t be cured.

KCAL9’s Michele Gile reports that while Rigby has told officials he may move out of the state, his destination is still unclear.

“I do think that it’s important for the public to be aware so that they can take precautions with their children,” Back said.