A federal appeals court has ruled that the state of Idaho must pay for a transgender inmate's sex reassignment surgery. The state says it will appeal the case to the U.S. Supreme Court.

Inmate Adree Edmo has been living as a woman for years, but has been housed in a men's prison, CBS Idaho affiliate KBOI-TV reports. Deborah Ferguson, an attorney representing Edmo, said in January that her client was at risk of self-harm if the surgery was postponed.

Edmo, 31, was diagnosed with gender dysmorphia in 2012. Ferguson argued that the state's refusal to provide the surgery was unconstitutional.

Get Breaking News Delivered to Your Inbox

"They certainly would treat a prisoner with cancer, they treat a prisoner with diabetes, or other chronic conditions," Ferguson said, according to 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."

Adree Edmo was diagnosed with gender dysmorphia in 2012 and sued the state of Idaho over access to surgery while in prison. Photos Courtesy of Ferguson Durham, PLLC, obtained by KBOI-TV

Earlier this year, the state of Idaho was put on a court-ordered deadline to pay for the surgery by mid-June. The state, however appealed that decision — a process it says has already cost more than $325,000.

On Friday, the court of appeals agreed with the federal judge that denying the surgery amounted to cruel and unusual punishment, a violation of the U.S. Constitution.

Idaho Governor Brad Little, however, said he intends to appeal the decision to the U.S. Supreme Court.

"The court's decision is extremely disappointing," Little said in a statement obtained by KBOI-TV. "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."

Edmo, a convicted sex offender who is expected to be released from prison in 2021, is not the only inmate in the state requesting surgery. Five other requests have been submitted since the beginning of 2019, according to the Idaho Department of Correction.