Portions of a new Florida law signed by Republican Gov. Ron DeSantis last month banning transgender treatments for children were temporarily blocked Tuesday by a Federal judge appointed by former President Bill Clinton.

"Gender identity is real. The record makes this clear," Judge Robert Hinkle wrote in a 44-page preliminary injunction against parts of SB 254, adding that there was no basis for the state to deny treatment to patients. 

The injunction prevented the ban from being applied to three children already receiving treatment whose parents are part of a lawsuit against the state over the law. He claimed they would "suffer irreparable harm" if they were not allowed to continue their treatments.

TEXAS BECOMES LATEST STATE TO BAN PUBERTY BLOCKERS, SEX CHANGE SURGERIES FOR MINORS

Republican Florida Gov. Ron DeSantis

Florida Governor Ron DeSantis speaks at a press conference at the American Police Hall of Fame & Museum in Titusville. (Paul Hennessy/SOPA Images/LightRocket via Getty Images)

The ruling, however, does not apply to children who have not already begun treatment.

Hinkle wrote that the ban was not a "legitimate state interest," and that it was a political decision. "Nothing could have motivated this remarkable intrusion into parental prerogatives other than opposition to transgender status itself," he wrote.

"There has long been, and still is, substantial bigotry directed at transgender individuals," he wrote. "Common experience confirms this, as does a Florida legislator’s remarkable reference to transgender witnesses at a committee hearing as ‘mutants’ and ‘demons.'"

NEWSOM THREATENS DESANTIS WITH ‘KIDNAPPING CHARGES’ OVER MIGRANT FLIGHTS TO SACRAMENTO

Tallahassee Florida state capitol building

The state capitol building in Tallahassee, Florida. (Joe Sohm/Visions of America/Universal Images Group via Getty Images)

"And even when not based on bigotry, there are those who incorrectly but sincerely believe that gender identity is not real but instead just a choice," he added.

Fox News Digital reached out to DeSantis' office for comment but did not immediately receive a response.

Following Florida, Texas became the latest state to ban puberty blockers and sex change surgeries for minors when Republican Gov. Greg Abbott signed its version of the bill into law last week.

Gender-affirming care hormones puberty blockers consent

Gender-affirming care has been called "life-saving" by  multiple medical associations. Its critics raise concerns about the long-term effects on the minor cohort, of which there is limited research, and the ability to consent.  (Adobe Stock )

CLICK HERE TO GET THE FOX NEWS APP 

Fox News' Greg Norman contributed to this report.