Idaho’s ban on transgender health care for adolescents is put on hold by the judge.

Idaho’s attempts to stop gender-affirming care have been thwarted by a federal judge who has issued restraining orders to forbid transgender health care for minors.

Only six weeks before the state’s law was set to take effect, U.S. District Judge B. Lynn Winmill issued a preliminary injunction on Tuesday.

“The court finds that the treatment for gender dysphoria is safe, effective, and medically necessary for some children when provided in accordance with the guidelines published by (the World Professional Association for Transgender Health) and the Endocrine Society,” Winmill wrote in response to a plaintiff writing that their mental health “greatly improved” since beginning treatment.

According to the Idaho Statesman, Winmill ruled that two transgender minors from Idaho and their families may be successful in their lawsuit against the law based on the equal protection and due process clauses of the 14th Amendment.

“These cases repeatedly demonstrate that the 14th Amendment’s primary function is to defend marginalized minorities and protect our fundamental rights from congressional overreach,” according to Winmill. After the Civil War, that was true for newly freed slaves. For women, people of color, interracial couples, and people seeking access to contraception in the 20th century, this was accurate. And in the twenty-first century, it holds true for trans children and their parents as well.

Republican Governor Brad Little signed the legislation, declaring it a necessary act to prevent adolescents from accessing hormone therapy, transition-related surgeries, and puberty blockers.