A judicial review has begun into plans to close libraries in Gloucestershire and Somerset.
The three-day hearing at the High Court in Birmingham has been brought about by campaigners fighting the proposals in the two counties.
Somerset County Council wants to withdraw funding for 11 libraries while Gloucestershire County Council wants to close 10 in a bid to save money.
The judicial review is examining the legality of the cuts.
On the first day of the hearing at Birmingham Civil Justice Centre, the court heard the authorities had "not offered a comprehensive and efficient library service for all" as laid down in the Public Libraries and Museums act of 1964.
'Could set precedent'
Johanna Anderson, from the campaign group Friends of Gloucestershire Libraries, said: "The cuts to our libraries are huge and disproportionate and they have been very poorly thought out.
"We have tried to argue the case through the council's proper procedures but we haven't been listened to, so we had to bring it to court so the details could be listened to fairly on all sides."
Kay Hoskins, from Friends of Somerset Libraries, said: "We are a rural county and we need libraries.
"Libraries are about far more than books; libraries are about communities."
Solicitor Danny Kerry said the case was "very significant" and "could set a precedent that counties all round the UK will pay attention to".
"The reason the spotlight is on Gloucestershire and Somerset is because they have cut deeper than virtually all other councils," he said.
"They've cut faster, and they've started off from a much worse position.
"The facts of this case are very stark and should send a very clear message to counties about what they need to do to comply with their legal duties."
On Wednesday the authorities are due to put forward their defence.