The Court of Appeal has quashed government rules extending the use of physical restraint on young offenders in secure training centres.
Judges threw out the rules - passed last year - which allowed restraint, including painful techniques such as pulling back thumbs, to be used to maintain "good order and discipline".
This means restraint will once again only be lawful to prevent trainees escaping, damaging property or harming themselves or others.
MoJ to appeal
The Ministry of Justice immediately announced it would consider appealing the decision.
The judgement came in a judicial review brought by a young person, known as AC, who was remanded to an STC. In a previous hearing in February, the High Court ruled that the MoJ breached its legal duties to consult children's commissioner for England Al Aynsley-Green and carry out a race equality impact assessment on the rule change.
Unlike the High Court, the Court of Appeal ruled that this was sufficient to quash the rules. It also found that they breached articles three and eight of the European Convention on Human Rights - the rights to be protected against torture or inhuman treatment and to a private life.
Myatt and Rickwood inquests
Last year's rule change followed inquests into the deaths of Gareth Myatt and Adam Rickwood in Rainsbrook and Hassockfield STCs, both of which raised serious concerns over the use of restraint. Gareth died in 2004 while being restrained by three staff and Adam killed himself in the same year after being restrained when he refused to go to his room.
Howard League for Penal Reform director Frances Crook welcomed this week's ruling, adding: "Allowing staff to use violence and inflict pain to restrain children merely to ensure 'good order and discipline' gives carte blanche for dangerous techniques to be used at any opportunity."
An MoJ spokesperson said: "Maintaining good order and discipline at a secure establishment is essential if those who live and work there are to be kept safe."
Court backs Inquest claim against Ministry of Justice ruling on restraintCampaigners speak out against plans to extend restraint powers
Oakhill STC given a further six months to improve
Expert guide to youth justice and the Youth Justice Board
Youth Justice Board - information on secure training centres