A federal district court has blocked Florida from enforcing a law that bans medical care for transgender children, calling it “unconstitutional.”

“Gender identity is real,” District Judge Robert Hinkle wrote, going on to say Florida’s law banning care for transgender youth and restricting it for transgender adults violates their equal protection rights.

The 2023 law, passed by Florida’s Republican-led legislature and signed by Gov. Ron DeSantis, prohibits doctors and nurses from prescribing medication, including hormones or puberty blockers, to anyone under 18.

“The State of Florida can regulate as needed but cannot flatly deny transgender individuals safe and effective medical treatment—treatment with medications routinely provided to others with the state’s full approval so long as the purpose is not to support the patient’s transgender identity,” the order states.

The transgender plaintiffs and their parents argued the law violated their constitutional rights.

In a 105-page order, Hinkle agreed, writing: “Whether based on morals, religion, unmoored hatred, or anything else, prohibiting or impeding a person from conforming to the person’s gender identity rather than to the person’s natal sex is not a legitimate state interest.”

The order does not address the state law’s ban on gender-affirming surgery for minors or surgery restrictions for adults as the lawsuit did not challenge those provisions, Hinkle noted.