Campaigners in Rhondda Cynon Taf say the local council has performed a u-turn on its decision to close Rhydyfelin Library.
They say the council has asked them to withdraw their judicial review case, and will re-open the library.
Local residents launched their legal challenge after saying they were not consulted on the closure, which went ahead at the end of May, even after a group chained themselves to the shelves.
The closure was one of 14 made by Rhondda Cynon Taf Council as it tries to make savings of £70m over the next four years.
Campaigner Sian Perkins said today: "We are truly elated. This victory is down to the power of the people. The whole community was committed to fighting to save this very necessary establishment and we weren’t prepared to back down."
“Rhydyfelin library is a vital component of our community used by everyone from pre-school children to pensioners."
More top news
Three elderly people are being treated for the effects of smoke inhalation following fire at a nursing home in Denbighshire
A few showers possible, but these tending to fade. Cloud will break up allowing a frost to form. Some patchy mist and fog may also develop.
The 48-year-old lecturer was taken to the University Hospital of Wales, Cardiff, where he sadly died.