Campaigners fighting to save a town's Grade II-listed library have had their case turned down in the High Court.
Councillors in Darlington voted in 2016 to relocate the facility in Crown Street to the Dolphin Leisure Centre, in a bid to save more than £300,000.
The move sparked protests and a campaign group mounted a legal challenge against the council's consultation process.
A High Court hearing has now ruled that the decision should stand.
Lawyers for the Save the Library campaign had claimed the council had a "closed mind", having already decided what it wanted to do.
But the judge said the authority was "willing to listen", having changed its plans in light of public comments.
Councillor Nick Wallis, cabinet member for leisure and local environment, said the outcome showed the consultation was "fair and transparent".
The campaign group said it will be taking advice on options, which could include an appeal.