A federal appeals court in St. Louis heard oral arguments Tuesday about whether the state of Minnesota's sex offender treatment program violates the Constitution with its practice of indefinite detention.

The case before the Eighth Circuit Court of Appeals could force the state to make a series of politically unpopular reforms to the Minnesota Sex Offender Program (MSOP), which has come under fire for its failure to release more offenders into the community.

Last June U.S. District Court Judge Donovan Frank in St. Paul, ruling in a lawsuit brought by a group of sex offenders, declared the program unconstitutional and ordered sweeping changes. The judge ordered the state to conduct more regular evaluations of the 725 rapists, child molesters and other offenders confined at secure treatment centers in Moose Lake and St. Peter, and to release those who no longer require confinement. The judge also ordered the state to develop less-restrictive treatment options in the community. The appeals court put Frank's order on hold until a three-judge panel could heard Minnesota's appeal.

Much of Minnesota's appeal centers on whether Frank had improperly taken sides before a contentious, six-week federal trial early last year on the program's constitutionality.

In Tuesday's hearing in St. Louis, attorneys representing Minnesota pointed to a series of comments Frank made before the trial, to argue that he had "prejudged" the case. In February 2014, a full year before the trial, Frank referred to the MSOP as "clearly broken" and said "the interests of justice require that substantial changes be made." A week before the trial, Frank admonished leaders in the legislative and executive branches, saying they had "let politics, rather than the rule of law and the rights of `all' its citizens guide their decisions."

"These and other comments before trial, and before all the evidence was heard, clearly demonstrate prejudgment and improper advocacy for the plaintiffs," said Minnesota Solicitor General Alan Gilbert, who is representing the state, at the hearing. The state has called on the appeals court to reverse Frank's ruling and hold a new hearing with a different judge.

Judges on the appeals court panel did not appear immediately persuaded by the state's arguments. One interrupted Gilbert to question why the state was raising concerns about judicial bias now rather than making objections during the trial. "To be charitable to the district judge, it's possible that he was expressing his policy preferences — and that perhaps he was capable of distinguishing between his policy preferences and the law," another judge said.

The state also argued that Frank's earlier ruling was wrong on the merits because attorneys for a class of offenders had failed to prove that any individual offender confined at the MSOP had been harmed, or was entitled to be discharged into the community.

During last year's trial, MSOP administrators made the surprising admission that they may be detaining untold numbers of offenders who no longer meet the statutory criteria for confinement. Because Minnesota law does not require periodic evaluations of civilly committed sex offenders, more than 440 individuals held at MSOP have not had their cases reviewed on that point, said Dan Gustafson, the lead attorney for a class of offenders who sued the state more than four years ago.

"Now that's troubling enough," Gustafson told the justices Tuesday. "But even worse yet, the testimony at trial was that the MSOP [officials] know of people who should be out but take no action."

The Dayton Administration has resisted demands for broad reforms while moving forward with incremental changes that would move offenders more quickly through treatment and expand housing options in the community. Gov. Mark Dayton's bonding proposal this year includes $12.4 million to design and build two, 20-bed residential sex offender treatment facilities in the community; and his supplemental budget includes $10.7 million over the next four years to hire enough staff to evaluate the risk level of all MSOP clients every other year.

A state task force in 2013 concluded that Minnesota's system for committing sex offenders "captures too many people and keeps many of them too long." The state confines more offenders per capita, and has the lowest release rate, among the 20 states that civilly commit sex offenders, in part because the state has failed to develop less-restrictive treatment options in the community. No one has ever been completely discharged from the program in its 20-year history. Eight have been conditionally discharged; of those, five are currently living under strict surveillance in the community.

Attorneys said a ruling on the state's appeal is expected by late summer.

Chris Serres • 612-673-4308

Twitter: @chrisseres