A federal judge on Tuesday struck down parts of Florida’s restrictions on transition-related medical care for transgender minors and adults, declaring several statutes that ban such care unconstitutional.

The law, championed by Republican Gov. Ron DeSantis, made Florida among the most restrictive states for transgender care in the nation.

“Transgender opponents are of course free to hold their beliefs,” Judge Robert L. Hinkle of the U.S. District Court for the Northern District of Florida, Tallahassee Division, wrote in his opinion. “But they are not free to discriminate against transgender individuals just for being transgender. In time, discrimination against transgender individuals will diminish, just as racism and misogyny have diminished. To paraphrase a civil-rights advocate from an earlier time, the arc of the moral universe is long, but it bends toward justice.”

Hinkle added, “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.”