A federal judge on Friday denied an effort by the state attorney general’s office to extricate the Baltimore jail system from a decades-long health care lawsuit, saying the corrections department’s progress toward meeting the terms of the lawsuit’s 2016 settlement has been “unacceptably slow.”

The ruling is a big blow to Maryland’s state government, which has long run city jails and has made exiting the lawsuit a top priority for its beleaguered corrections department. To that end, the Maryland Office of Attorney General recently hired a private law firm known for defending prison systems in states like Alabama and Louisiana to ratchet up its legal defense.

The state gave the firm, Butler Snow LLP, and its lead attorney on the case, William Lunsford, a tall order. Its corrections department is in compliance with just two out of the settlement’s 10 provisions, and has struggled to make significant progress. But Lunsford and his colleagues went on the offensive in court, making forceful arguments in recent hearings.

The private attorneys accused the independent medical monitor, who has since resigned, of being the main impediment to progress, and argued that the lawsuit’s burdensome terms are what is preventing medical providers from improving care at the facilities, as opposed to the rotating cast of private medical vendors such as YesCare, which was recently ousted.

The Baltimore Banner thanks its sponsors. Become one.

In the most recent court hearing for the lawsuit, in August, Lunsford and other Butler Snow attorneys argued that the settlement had expired in June, because the original terms of the settlement agreement were only set to last for four years. And even if the agreement hadn’t expired, Butler Snow attorneys argued, the state would actually be found to be in “substantial compliance” with the other eight provisions of the settlement, if given a fair evaluation.

On Friday, U.S. Judge Matthew J Maddox rejected that notion, saying that the most recent reports from independent medical and mental health monitors “tell a different story.” He ruled that the settlement would be extended for another two years, unless the state could show it is in full compliance before then.

The class action suit, brought by the ACLU’s National Prison Project and other local groups has, has a long history. The suit has been settled, reopened and settled again, most recently in 2016, but then it was reopened once again to enforce the terms of that settlement.

In addition to funding the attorney general’s office’s efforts, the state has so far spent more than $400,000 on Butler Snow’s legal services through the end of June, according to the attorney general’s office, which declined to comment on the ruling.

The ruling comes on the heels of leaked documents showing a DEA probe into the Maryland Department of Public Safety and Correctional Services and the Baltimore Central Booking and Intake Center, the city’s main pretrial facility.

The audit, which appears to have never been made public, raised urgent questions about the jail’s record keeping, which has been at the heart of the health care lawsuit as well.