A county council's plan for 10 libraries to be run by volunteers was ruled unlawful by the High Court today.
Surrey County Council planned the community library scheme in a move aimed at keeping its 52 libraries open.
But two local residents succeeded in a judicial review challenge over the council's plans to remove all paid staff from 10 community libraries, leaving them to be run entirely by volunteers.
Mr Justice Wilkie, sitting in London, said the local authority "failed to have due regard to the equality issues" raised by the case.
The libraries identified as possible community facilities were Bagshot, Bramley, Byfleet, Ewell Court, Lingfield, New Haw, Stoneleigh, Tattenhams, Virginia Water and Warlingham.
The local residents, represented by Public Interest Lawyers (PIL), who brought today's successful legal challenge are Nicholas Dorrington and Lucy Williams.
Mr Dorrington said: "I am delighted with the result and I hope that it reminds senior county councillors that they should not forget that we employ them to provide efficient services and, as importantly, represent us the electorate.
"It is a great disappointment that the council has wasted thousands of pounds of taxpayers' money trying to ignore and ride roughshod over public criticism and outrage, defending the indefensible."
Ms Williams said: "I am absolutely over the moon with the result.
"Libraries are such an important part of local communities and for Surrey County Council to remove funding for library staff would have had a terrible impact on the local area.
"Everyone is painfully aware that cuts need to be made at the moment, but I hope that councils across the country will think twice before trying to implement them in sectors that are so vital not only to community groups, but also integral to education, promoting literacy and the joy of reading."
PIL solicitor Phil Shiner said: "This is a fantastic result for the claimants as well as a sharp reminder to local authorities up and down the country that a need for budget cuts is not an excuse for cutting local services without careful consideration of how such cuts will impact upon vulnerable groups.
"In this case, it was clearly unlawful for Surrey County Council to remove all paid staff from 10 libraries whilst dismissing the impact of such a change with vacuous assertions that all problems will be cured by training for volunteers."