A legal battle over plans to move Church Stretton Library to the town's school has been abandoned.
A High Court judge was due to hear arguments that council officials had acted "unlawfully" in deciding to relocate the library.
Moments before the hearing, lawyers for the council and campaigners reached an agreement.
The authority said it would quash the move and campaigners said they would bid for the public to run the library.
It is still not clear what the future location of the library will be, but further consultation is expected.
The council said the cost of the case to the taxpayer was already expected to run into tens of thousands.
Felicity Thomas, for the Church Stretton Library Support Group, (CSLSG) said: "We are delighted that Shropshire Council has decided not to defend its earlier decision to relocate the library, thus saving taxpayers the cost of having the case proceed."
George Candler, Shropshire Council's director of commissioning, said: "There was no point in the council defending in the court a challenge from CSLSG to secure an outcome that had already been explained was an option to them over a considerable time."
The group had argued that moving the Church Street library to the school on the edge of the town would make it less accessible for the area's older-than-average population.