Four magistrates' courts which were believed to be at threat of closure will stay open after a review of south Wales court provision was withdrawn.
Barry magistrates' court was one of the courts under review
Courts at Barry, Aberdare, Port Talbot and Llwynypia in Rhondda were thought to be facing shutdown.
The Public and Commercial Services Union (PCS) had said it would oppose any compulsory redundancies.
But HM Court Services described the review as an "internal exercise" and said it would not proceed any further.
A spokesperson said: "It has been decided that it will not progress any further at this time.
"HMCS will continue to look at how it can make efficient and effective use of all its courts.
"Any future proposals would be full consulted on within the local community before any final decisions were made by the lord chancellor."
Rhondda MP Chris Bryant said he was pleased Llwynypia magistrates' court, in his constituency, would not close.
He added: "I am delighted that this vital institution will remain open.
"If we are to deliver local justice in the valleys we need to have local courts.
"I know Llwynypia have worked hard to tilt the balance in favour of the victims of crime, with much better facilities for witnesses and victims, especially when it comes to domestic abuse, so the thought of closing the magistrates' court was plain daft.
"Witnesses and defendants not turning up for court appearances is a major problem which would only have worsened if the closure had gone ahead."