The state is pushing back against a court order that would force it to move more than 150 inmates into psychiatric hospitals by June 1, reports the Austin-American Statesman.

Dateline Houston applauded the January decision that demanded the Department of State Health Services move forensic inmates—prisoners deemed incompetent to stand trial—into a state mental hospital within 21 days of a judge’s order.

It’s a problem that gets written about periodically, but was never a priority until state District Judge Orlinda Naranjo’s order.

Now, state officials have responded with a resounding, “We can’t.”

The problem is this: forensic inmates, who are often arrested for nonviolent offenses and have to be in pretty acute psychological distress to be deemed incompetent, must be made competent, usually through medication, before they can be tried. These prisoners are sick and not yet convicted of anything, but because of their sickness, they can’t move through the system like others can. Some facilities, like the Harris County Jail, have the resources to treat incompetent inmates in-house, but most don’t—which means sick prisoners are waiting untreated, often for several months, for a bed to open up at a state mental hospital so they can begin treatment. Many prisoners wait for a bed for longer than their sentences would have been had they been healthy enough to be sentenced right away.

Judge Naranjo’s order stemmed from a 2007 lawsuit brought by Disability Rights Texas, which advocates for the disabled, including people with mental illness. The lawsuit claimed that the delay in getting prisoners into hospitals violated their rights to due process, and Judge Naranjo agreed. “The relevant state interests do not outweigh the Incompetent Detainees’ liberty interest,” she wrote. In other words, a shortage of state beds isn’t a good enough reason to deprive someone of his liberty.

The Texas attorney general’s office has asked Judge Naranjo to review the decision and also appealed the ruling with the Texas Third Court of Appeals.

“The short timelines set forth in the court’s order makes it physically, fiscally, and logistically impossible for DSHS to comply and indicates a lack of appreciation for the magnitude of the task and the complications inherent in implementing the order,” the state writes in the motion for a new trial.

It estimates that compliance would cost between $39 million and $55.2 million.

Beth Mitchell of Disability Rights Texas tells the Statesman, “Money cannot be a reason to let people languish in jails.”