A three-judge panel for the United States Court of Appeals for the Ninth Circuit on Friday affirmed the ruling of a district court’s previous ruling in favor of an inmate seeking treatment for gender dysphoria in an opinion that also served as a scathing rebuke of the Fifth Circuit taking the opposite stance in a similar case.

In a unanimous decision, the Panel ruled that Idaho state prisoner Adree Edmo established that the prison acted in violation of his Eighth Amendment rights by refusing to perform her gender confirmation surgery (GCS). The court ruled that the procedure was medically necessary and ordered the state to provide the surgery.

“The panel held that the record, as construed by the district court, established that Edmo had a serious medical need, that the appropriate medical treatment was GCS, and that prison authorities had not provided that treatment despite full knowledge of Edmo’s ongoing and extreme suffering and medical needs,” the court wrote.

The Court then pointed out that Friday’s decision stood in direct contradiction to similar case recently decided by the Fifth Circuit where it ruled that a state does not inflict cruel and unusual punishment by declining to provide GCS to a transgender inmate. In that case, Gibson v. Collier, the majority reasoned that “there is no consensus in the medical community about the necessity and efficacy of [GCS] as a treatment for gender dysphoria…This on-going medical debate dooms Gibson’s claim.”

The Ninth Circuit Panel was not shy about voicing its disagreement and disdain for the Fifth Circuit’s Gibson decision, stating that it relied on the “incorrect, or at best outdated, premise,” regarding GCS.

“Gibson’s broad holding stemmed from a dismaying disregard for procedure…to reach its broader holding that denying GCS cannot, as a matter of law, violate the Eighth Amendment—in other words, to reject every conceivable Eighth Amendment claim based on the denial of GCS—the Fifth Circuit coopted the record from Kosilek, a First Circuit decision that predates Gibson by four years. We doubt the analytical value of such an anomalous procedural approach,” the Panel wrote.

The Panel then took the Fifth Circuit to task for its misguided reliance on the court’s decision in Kosilek to show that GCS was never necessary, because the expert in that case were only speaking to the very specific circumstances presented in that case, and made no statements about the larger efficacy of the procedure.

In this latter respect, Gibson also contradicts and misconstrues the precedent it purports to follow: Kosilek. According to the Gibson majority, ‘the majority in Kosilek effectively allowed a blanket ban on sex reassignment surgery.’ Not so. The First Circuit did precisely what we do here: assess whether the record before it demonstrated deliberate indifference to the plaintiff’s gender dysphoria. On the record before it, the First Circuit determined that either of two courses of treatment (one included GCS and one did not) were medically acceptable.

The majority in Kosilek also explicitly stated that the court’s decision should not be construed as being applicable to all cases for denying GCS, a point which the Panel was quick to highlight.

“[The Kosilek Court] expressly cautioned that the opinion should not be read to ‘create a de facto ban against GCS as a medical treatment for any incarcerated individual, as ‘any such policy would conflict with the requirement that medical care be individualized based on a particular prisoner’s serious medical needs.’ The Fifth Circuit disregarded these words of warning.”

Professor Steve Vladeck of the University of Texas School of Law took note of the Ninth Circuit’s umbrage, saying it was unusual for one circuit to call out another in such blatant fashion.

“It is rare to see a federal court of appeals take one of its sister circuits to the woodshed (and knowingly—which is almost certainly why the panel’s opinion is unsigned). In this case, though, I think the Ninth Circuit’s concerns are well-taken,” Vladeck wrote.

He also appeared to insinuate that the Fifth Circuit’s decision may have been based on some level of anti-transgender bias, noting that in its decision the court refused to refer to the defendant by their preferred gender identity.