The state Department of Corrections on Friday filed formal notice of its intent to appeal a sweeping decision ordering the agency to drastically overhaul its beleaguered treatment system for prisoners with severe mental illnesses.

Corrections officials have long indicated they planned to appeal Circuit Judge Michael Baxley's January ruling in the class action lawsuit, even as they look for ways to improve care for the mentally ill behind bars.

The ruling is the result of a 2005 lawsuit filed against the agency by the nonprofit group Protection and Advocacy for People with Disabilities Inc., on behalf of mentally ill prisoners. In a scathing 45-page ruling, Baxley described an underfunded, understaffed and broken system in desperate need of a fix that will likely cost several million dollars.

State corrections officials have been meeting in mediation with lawyers for the nonprofit group in attempt to come up with solutions to the problems Baxley cited.

At the same time, the state has indicated it would appeal the order to challenge what they see as a constitutionally questionable attempt to legislate from the bench.

The state's notice was filed Friday with the state Court of Appeals and the Richland County Clerk of Court.