Many local authorities throughout the country face having their budgets thrown into disarray by a new High Court ruling over funding of accommodation for discharged mental patients.
Mr Justice Sullivan has ruled that authorities are not entitled to insist on discharged patients paying for the accommodation it is stipulated they must live in as a condition of their discharge.
It is estimated that the decision could cost some local authorities an extra £50m.
Richard Lissack QC, who acted for the local authorities, told the judge that the ruling would have a "potentially catastrophic effect" on local authority budgets.
But Karen Ashton of the Public Law Project, which represented two people in the case, has welcomed the ruling.
She says that apart from the implications for the future, namely that local authorities will be faced with a new area of funding, there is also the possibility that those who have been charged for accommodation in the past, will now be looking for refunds.
The decision centred on four patients who had all been detained in hospital under the Mental Health Act because of the severity of their illness.
They included a 66-year-old woman suffering from dementia, who was charged £137-a-week for accommodation in Weybridge, Surrey; a Manchester man who has had a long mental illness and who was charged £114-a-week for his accommodation; and a 69-year-old woman from Middlesex, who Harrow Council claimed should pay residential home arrears totalling £21,198.
When they were released from hospital, all four were compelled, as a condition of their release, to live at special homes under supervision and guardianship arrangements designed to protect both them and the public.
The councils involved were the London Borough of Richmond, Redcar and Cleveland Borough Council, Manchester City Council, and the London Borough of Harrow.
They argued that they were entitled to charge the patients for the accommodation and that it was not free under the Mental Health Act.
However, in a landmark ruling, the judge held that in each of the four test cases the councils were obliged to provide the accommodation.
He said it would be "surprising" if such people could be required to pay for accommodation in which they were being compelled to live.
Ashton says the councils claimed that around 50 per cent of local authorities in England and Wales charged for residential services and facilities of the type at the centre of this case.
"We argued that this charging was unlawful, and that there was no power for the councils to charge in this way," she says.
"I think that one of the advantages of the case being handled in the way it was, with four different local authorities and four different types of patient, was that it gave the court the benefit of seeing the way these charges are imposed in different circumstances.
"The key issue was the lawfulness of charging.
"You have a particularly vulnerable sector of the public who are least likely to be able to pay their way and were being charged to live in places they might not have chosen themselves.
"It is an odd situation and I think this factor struck home."
Ashton continues: "The judge's ruling is a very good result and it has implications for very large numbers of people both currently and obviously in the future.
"As far as the present is concerned, many people have been living in such residential accommodation, sometimes for many many years, and have been paying ever since.
"Refunds will now be an issue. The judge didn't make any orders for refunds because the councils in these four cases made it clear they would make them.
"But in the light of the ruling others in the same predicament may now seek refunds."
Leave to appeal the decision has been granted on the basis of the public importance of the case.