Overturning a Tallahassee federal judge's decision, a split appeals court ruled that Florida corrections officials did not violate constitutional equal-protection rights when they refused to allow a transgender inmate to dress and groom like a woman.

A majority of the three-judge panel found that corrections officials "chose a meaningful course of treatment" to address Reiyn Keohane's gender dysphoria.

"For better or worse, prisoners aren't constitutionally entitled to their preferred treatment plan or to medical care that is great, 'or even very good,' " Judge Kevin Newsom, citing another court decision, wrote in Wednesday's 40-page majority opinion.

U.S. District Judge Mark Walker in August ordered the Florida Department of Corrections to continue providing hormone treatments to Keohane, who was born a male but began identifying as female at age 8 and started wearing women's clothing, makeup and hairstyles at 14, according to court records.

Accusing prison officials of ignorance and bigotry, Walker ordered the state to allow Keohane, who had begun hormone therapy before she started serving a 15-year sentence for attempted murder in 2014, to wear women's undergarments and have access to grooming items available to female inmates.

After Keohane sued the Department of Corrections and prison officials in 2016, she was allowed to resume the hormone treatments. But prison officials continued to refuse to allow Keohane, who is incarcerated at the all-male Wakulla Correctional Institution Annex and has attempted suicide several times while in prison, to wear women's undergarments, let her hair grow or groom as a woman.

The treatment provided to Keohane isn't "so unconscionable as to fall below society's minimum standards of decency," and thus violate the U.S. Constitution's Eighth Amendment, "merely because it conflicts with the opinion of Keohane's retained expert," Newsome wrote.

"Put simply, when the medical community can't agree on the appropriate course of care, there is simply no legal basis for concluding that the treatment provided is 'so grossly incompetent, inadequate, or excessive as to shock the conscience or to be intolerable to fundamental fairness,'" Newsom wrote.

In a scathing 51-page dissent, Judge Charles Wilson acknowledged that prison administrators are allowed to make judgments balancing security and health concerns.

"But the prison must 'balance' the competing interests — something that the district court found the FDC (the Department of Corrections) did not do," Wilson wrote.

Keohane's lawyers are "closely reviewing the decision, including the powerful dissent," American Civil Liberties Union of Florida attorney Daniel Tilley, who represents her, told The News Service of Florida.

"Comprehensive treatment for gender dysphoria is critically important for the health and well-being of many transgender people. It is unconstitutional for the DOC (Department of Corrections) to deny inmates any care that is medically necessary to treat their serious medical needs, and that is exactly what the DOC has done to Reiyn," he said.

Corrections officials pointed to security concerns in refusing to allow Keohane to dress and groom as a female, an argument that Walker called a "red herring." But the appeals court supported the corrections' officials on the security argument.

Previous courts, the majority noted, have stressed that prison administrators are entitled to "wide-ranging deference" when making safety and security assessments.

"The FDC has given Keohane some, but not all, of what she wants — although it has denied her social-transitioning requests (at least as they pertain to clothing and grooming), it has provided mental-health counseling, hormone therapy, the use of female pronouns, safer housing accommodations and private shower facilities," Newsom wrote in the opinion joined by Judge Scott Coogler.

The state "struck that balance" because Keohane's treatment team "has determined that her current regiment is sufficient to treat her gender dysphoria" and "rationally concluded" that her requests to dress and groom herself as a woman "would present significant security concerns in an all-male prison," the judge wrote.

"Bottom line: In light of the disagreement among the testifying professionals about the medical necessity of social transitioning to Keohane's treatment and the 'wide-ranging deference' that we pay to prison administrators' determinations about institutional safety and security … we simply cannot say that the FDC consciously disregarded a risk of serious harm by conduct that was 'more than mere negligence' and thereby violated the Eighth Amendment," the majority opinion said.

But corrections staff said they never considered Keohane's request to wear women's clothing because a department policy prohibited it, Wilson wrote in the dissent.

"Prison officials did not evaluate the security risks of social transitioning and deem them too great — they assumed that FDC policy would always forbid the treatment, and that was the end of it," he wrote.

Keohane's treatment team was wrong that security policy always forbids social transitioning, because medical staff — not security staff — have the ultimate say in granting medical exceptions to security policies, Wilson added.

"Even though the FDC's own policy makes clear that security bends the knee to medicine, Keohane's treatment team washed its hands of the matter the moment it concluded that FDC policy forbids social transitioning. That arises to deliberate indifference," Wilson wrote in a footnote.

Keohane, now 26, repeatedly requested to be allowed to "socially transition" after entering the prison system in 2014.

Instead, prison officials several times "forcibly shaved" Keohane's head after she protested the agency's hair-length policy, which requires men to wear their hair above the ears, according to court records. Prison workers also confiscated her self-made bras and panties.

In its conclusion, the appeals-court majority acknowledged Wilson's "passionate and heartfelt" dissent, which Newsom wrote would precipitate sweeping changes in the law of prison administration.

"One final word: This is a case that stirs emotions. And understandably so — the question whether and to what extent Florida prison officials must accommodate Keohane's gender dysphoria is a sensitive one on both sides of the 'v,'" Newsom wrote.

"Make no mistake, we too have sympathy for Ms. Keohane, and we too regret her predicament," he added. "But our first obligation — our oath — is to get the law right. … And our best understanding of the law is that — for better or worse — it simply does not entitle Ms. Keohane to additional relief."

Wednesday's opinions featured lengthy footnotes in which the majority and the dissenting judge sniped at each other.

For example, the majority in one footnote accused Wilson of engaging in "mindless, mechanical box-checking" to support his dissent.

Wilson accused the majority of relying on the wrong analysis to reach its conclusions and of parting ways with previous court rulings. The appeals court's role "is not to reweigh the evidence or recreate factual findings," he wrote.

The appeals court judges "must therefore defer" to Walker's findings, unless they find he made a mistake, Wilson wrote.

"It does not matter if, after reviewing the record, we would have found differently," he added. "Because the record supports the district court's findings, we should affirm them, not shake the magic 8-ball until it gives us a different result."

Dara Kam reports for the News Service of Florida.