The Scottish Executive is to appeal against a judge's decision to award compensation to a prisoner for having to slop out in a Glasgow jail.
A prisoner was awarded compensation by a judge
Lord Bonomy said the practice amounted to "degrading treatment", paving the way for a flood of similar claims.
But Justice Minister Cathy Jamieson said ministers believed there were grounds for appealing his conclusions.
She also announced a package of measures aimed at speeding up improvements to prison conditions.
Robert Napier raised a legal challenge in 2001 under the European Convention on Human Rights.
He claimed that slopping out, where prisoners use buckets in their cells, breached his human rights.
Napier was held at Barlinnie Jail after being arrested after failing to appear at the High Court on robbery, assault and abduction charges.
Lord Bonomy awarded him £2,400 after ruling that slopping out amounted to degrading treatment.
He said the practice violated articles three and eight of the convention and the common law "duty of care."
Ms Jamieson said on Wednesday that ministers had decided to lodge an appeal after examining the judgement.
The move was welcomed by Scottish National Party justice spokeswoman Nicola Sturgeon, who said the minister had "no option" but to appeal.
"It would make a mockery of justice for convicted criminals to receive massive payouts," she said.
"However, it should not be forgotten that this is a problem of the executive's own making.
"The slopping out judgement should have come as no surprise to anyone. It was absolutely inevitable."
Deputy Tory leader Annabel Goldie added: "It's all very well for the executive for appeal, but they still haven't told us when slopping out will end, how much money
has been set aside to end slopping out and how much compensation might have to be paid if the appeal fails."
Ms Jamieson said that a major modernisation programme had made "real progress" towards ending slopping out.
"I am announcing a package of measures to accelerate our prison reforms," she said.
"This includes the creation of 200 new places in rapid-built units on the existing estate, enabling us to press ahead with the much-needed expansion of the open prison estate and female prison facilities.
"The package also includes measures to ensure we are making the best use of custody."
These include the use of electronic monitoring to reduce the number of low-risk prisoners on remand,
and the introduction of home detention curfews for low-risk inmates approaching release.