A woman holds a sign that reads "We Love Our Trans Youth" during a rally in Montgomery, Alabama, on March 30, 2021.
CNN  — 

A federal judge has partially blocked an Alabama law that restricts gender-affirming treatments for transgender minors.

In granting the preliminary injunction late Friday night requested by the Justice Department and private plaintiffs, Judge Liles Burke said that there was a substantial likelihood that the court would find unconstitutional the law’s restrictions on providing transitioning medications, such as puberty blockers, to minors.

Other parts of the law – including its ban on sex-altering surgeries on minors and its regulations aimed at school officials – remain in effect.

“Defendants produce no credible evidence to show that transitioning medications are ‘experimental,’” wrote Liles, who was appointed by former President Donald Trump. “While Defendants offer some evidence that transitioning medications pose certain risks, the uncontradicted record evidence is that at least twenty-two major medical associations in the United States endorse transitioning medications as well-established, evidence-based treatments for gender dysphoria in minors.”

Among those challenging the law were minors, parents, and doctors, who sued last month arguing that the law violates the 14th Amendment’s equal protection clause. The Justice Department was allowed to intervene in the case to also challenge Alabama’s restrictions.

The judge said that the “Parent Plaintiffs have a fundamental right to direct the medical care of their children,” finding that they were likely to succeed in their due process claim. The judge also said that the minors were likely to succeed in their equal protection claim and that Alabama’s “proffered justifications” for the law “are hypothesized, not exceedingly persuasive.”

The Alabama law, dubbed the Alabama Vulnerable Child Compassion and Protection Act, was enacted last month and went into effect last week. Under the law, medical professionals who provide gender-affirming care to anyone younger than 19 could face up to 10 years in prison.

The law also prohibits school nurses, counselors, teachers, principals, and other school officials from trying to “encourage or coerce” a minor to withhold from their parents the “fact that the minor’s perception of his or her gender or sex is inconsistent with the minor’s sex,” or from withholding that information from parents.

The Alabama measure is part of a larger movement by Republican-led states to impose restrictions on the lives of transgender youth in the US. Despite the legislative push to end this kind of treatment, gender-affirming care is a recommended practice for people who identify as transgender, meaning they identify with a gender that is different from the one assigned at birth, or gender-diverse, with a gender expression that doesn’t strictly match society’s traditional ideas about gender.

CNN’s Shawna Mizelle and Veronica Stracqualursi contributed to this report.