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
It will support 41 projects across 16 local authorities, creating an additional 2818 school and childcare places for Welsh medium learners.
Jade Owen was given the anonymous donation to pay for surgery in the US which isn't available on the NHS in Wales.
The money will be used to develop construction materials to make homes more energy efficient.