It’s now up to a state appeals court panel whether to release Thomas Ray Duvall, a serial rapist and one of the most violent sex offenders in state history.

At a hearing Wednesday, the Minnesota Department of Human Services (DHS) appealed the conditional release of Duvall, 62, who has spent 30 years locked up for a series of brutal rapes of teenage girls in the 1970s and ’80s. A lower court panel in January approved him for conditional release from the Minnesota Sex Offender Program (MSOP).

“[Duvall] is not ready for life in the community, and our obligation to protect the public demands that we continue to oppose his provisional discharge and ask the court of appeals to reverse” a lower court decision, said Acting Human Services Commissioner Chuck Johnson in a written statement.

The state’s appeal has put DHS and its attorneys in the difficult position of opposing its own treatment team, including clinicians at the MSOP, who strongly supported his discharge into the community.

But the three-judge panel of the Minnesota Court of Appeals did not appear persuaded by the state’s arguments, questioning why DHS was opposing the conclusions of its own clinicians.

At one point, Appeals Court Judge Peter Reyes Jr. interrupted the DHS attorney to assert that Duvall had been a “model person to work with by all accounts” and that “across the board, people have said he’s ready for the next stage.”

Attorneys for DHS maintain that a lower court panel erred by excluding the oral testimony of Duvall’s victims, and by relying too heavily on the opinion of MSOP’s nonprofessional staff, who described Duvall as a model detainee during a five-day trial early last year.

In testimony, staff at the MSOP said that Duvall had gone on more than 100 community outings, and had worked at a thrift store for eight years, without any incidents of inappropriate behavior. Duvall also complied with his treatment program, eventually becoming a mentor to other offenders at the MSOP, these staff said.

Duvall was civilly committed as a psychopathic personality in 1991, and has been in the final stage of treatment at the MSOP since 2010.

At Wednesday’s hearing, William Lubov, an attorney for Duvall, urged the panel to look beyond his client’s violent past and focus on his success in treatment. “This is not an examination of whether [Duvall] committed acts that were criminal or heinous, to which he has admitted,” he said. “He has abided by every rule and regulation.”

Duvall’s extraordinarily violent crimes, and his repeated attempts to gain conditional release, have made him one of the state’s most notorious sex offenders.

In 1978, Duvall was convicted of raping a 17-year-old girl whom he picked up at the State Fair after promising to drive her home. After being released on parole, he sexually assaulted a young woman at knifepoint whom he found walking to a bus stop. Just three days after his release for that crime, in 1982, Duvall raped two girls, ages 14 and 15, while threatening them with a shotgun.

Then in 1987, just 12 days after being released from prison, Duvall talked his way into a Brooklyn Park apartment, bound a 17-year-old girl with an electric cord and then repeatedly raped her over a three-hour period while hitting her in the face with a hammer. Duvall admitted to the assault and later testified that he was “sexually aroused from me causing her pain,” according to court documents.

At last year’s trial, attorneys for DHS repeatedly pointed to Duvall’s own writings as evidence that he is unable to control his violent and deviant urges. As part of his therapy at the MSOP, Duvall maintained personal journals, or “fantasy logs,” describing his inner thoughts. In the logs, which span more than 500 pages, Duvall described having fantasies about teenage girls and female body parts while masturbating, according to court documents. A court-appointed examiner, Dr. James Alsdurf, testified that the logs showed that Duvall was “hypersexual” and “obsessed with sex,” and not ready for release.

State attorneys also raised concerns that Duvall repeatedly failed lie detector tests, including one as recent as last June, in which he was asked about masturbating to violent sexual fantasies. “There is a history here of Duvall doing exceptionally well in treatment only to reoffend when he’s no longer under supervision,” Assistant Attorney General Michael Everson said at the hearing. “Mr. Duvall is a uniquely dangerous individual.”

Among those present in the courtroom Wednesday was the sister of the woman who survived Duvall’s 1987 rape in Brooklyn Park. She expressed concern that the judges who approved Duvall’s conditional discharge in January did not hear from victims like her sister, who remains so traumatized by the assault that she has been unable to hold steady work and changes her telephone number every month, her sister said.

“No one ever mentions that my sister was beaten so badly [by Duvall] that she thought she was dead,” said the victim’s sister, who asked to remain anonymous. “Had the judges heard from more victims, I am sure the outcome would be very different.”

The appeals court panel is expected to issue a decision on Duvall’s release within 90 days. If the panel upholds the lower court’s decision, Duvall would be released to a halfway house in the community and would live under unusually strict surveillance. He would have 24-hour supervision and GPS monitoring, and would not be allowed to leave the residence without an escort, among other limitations on his freedom.