The Ninth Circuit Court of Appeals ruled last week that the State of Idaho must pay for a sex offender's gender reassignment surgery.

The inmate, 31-year-old Adree Edmo, was born a male but identifies as female and is currently serving three to 10 years for sexual abuse of a child. Edmo sued the state for refusing to pay for the inmate's gender reassignment surgery. According to the inmate, not having gender reassignment surgery "amounts to cruel and unusual punishment and causes severe distress because she has gender dysphoria," the Idaho Statesman reported. Edmo's attorneys argued that by not having the gender reassignment surgery, their client's gender dysphoria is so bad that he can't function on a day-to-day basis.

"They certainly would treat a prisoner with cancer, they treat a prisoner with diabetes, or other chronic conditions," Edmo's attorney, Deborah Ferguson, told KBOI-TV. "So, we have a medically recognized condition that's very treatable and we have been trying to get her the treatment that she very much needs."

Originally, a lower court agreed with Edmo. Idaho, however, challenged the decision in the Ninth Circuit Court of Appeals, who also agreed with the District Court judge.

"We hold that where, as here, the record shows that the medically necessary treatment for a prisoner's gender dysphoria is gender confirmation surgery, and responsible prison officials deny such treatment with full awareness of the prisoner's suffering, those officials violate the Eighth Amendment's prohibition on cruel and unusual punishment," the Appellate Court ruled.

Idaho Gov. Brad Little (R) plans to appeal to the Supreme Court.

“The court’s decision is extremely disappointing,” Little said statement. “The hardworking taxpayers of Idaho should not be forced to pay for a convicted sex offender’s gender reassignment surgery when it is contrary to the medical opinions of the treating physician and multiple mental health professionals. ... We cannot divert critical public dollars away from the higher priorities of keeping the public safe and rehabilitating offenders.”

Edmo, however, is taking a victory lap.

“I am relieved and grateful the court recognized my right to necessary medical treatment, and that I will get the surgery I need. I hope my case helps the State of Idaho understand that they can’t deny medical care to transgender people,” Edmo said in a statement released by the National Center for Lesbian Rights, who filed the lawsuit on his behalf.

If the State of Idaho pays for Edmo's gender reassignment surgery, this would be the first time in history an inmate has had this type of surgery performed while incarcerated.

As of now, the state has spent more than $325,000 on appealing the original decision.