Under-16s must be able to understand "the immediate and long-term consequences" of puberty blockers before they are allowed to receive them, the High Court has ruled.
The landmark judgement was passed down today in a case brought by Keira Bell, 23, who was prescribed puberty blockers when she was 16.
At the time, Bell, who was born female, wanted to transition to male but she later experienced regret and reverted back to her biological sex.
Bell was prescribed puberty blockers by the Tavistock Centre, the only dedicated NHS clinic for children with gender dysphoria in the UK.
She brought the legal challenge against Tavistock and Portman NHS Trust together with a second claimant, named only as Mrs A, whose 15-year-old autistic daughter is on the waiting list for treatment at Tavistock.
They argued that it was not possible for minors to give informed consent to puberty blockers.
In her witness statement, Bell said: "I made a brash decision as a teenager, (as a lot of teenagers do) trying to find confidence and happiness, except now the rest of my life will be negatively affected."
In her judgement today, Dame Victoria Sharp said that the ability of a child to give "valid consent" to the drugs would depend on their ability to "understand, retain and weigh" a number of factors like the immediate consequences, both physical and psychological, the impact on future relationships, and possible "unknown" consequences.
They must also be able to understand the "long term risks" of taking the drugs.
The court said it was "highly unlikely" that a child aged 13 or under would be competent to give consent to the treatment.
The court also ruled that clinicians should apply to the courts in any case where there is doubt over the long-term interests of a 16- or 17 year-old considering a medical transition.
Campaign group Transgender Trend called the verdict a "watershed moment" that would "protect vulnerable children".
"This case has shone a light on the worst and most unforgivable result of the institutional capture throughout society by the gender lobby: the medical experiment on children's healthy bodies, with serious irreversible and lifelong consequences," the group said.
"It is a judgment that raises serious questions not only about the Tavistock's service, but about the transgender lobby groups that have influenced the NHS and pressured the Tavistock into providing these treatments for children at ever younger ages."
It concluded by calling on the Government to, in light of the verdict, remove all transgender guidance and resources from schools and social services departments "to safeguard children and prevent any further teaching of this ideology to children as 'fact'".
Therapists and counsellors must also be "given back their freedom to do their jobs properly and offer children a normal duty of care".
"The Health Secretary must take steps to curb the influence of these lobby groups and eliminate ideology from medical theory and practice," the group said.
"Proper therapeutic pathways need to be developed within a psychoanalytical model that can be delivered by professionals already trained in counselling troubled young people.
"Children must be treated as children, not as political mascots for an ideology."