A federal judge has ordered Idaho to provide gender confirmation surgery to a transgender inmate.

Adree Edmo is being held in a men's prison, despite living as a woman for years.

According to the AP, Edmo is on track to becoming the first inmate in the Idaho Department of Correction's custody to undergo such a procedure.

U.S. District Court Judge B. Lynn Winmill said that withholding the surgery violates the U.S. Constitution.

“For more than forty years, the Supreme Court has consistently held that consciously ignoring a prisoner's serious medical needs amounts to cruel and unusual punishment in violation of the Eighth Amendment,” Winmill wrote in his ruling.

Edmo is represented by the National Center for Lesbian Rights (NCLR).

“I hope that this makes clear to IDOC and also to prison systems around the country that they can't deny medically necessary care to transgender prisoners – that is a requirement under our constitution,” said NCLR attorney Amy Whelan. “They need to start evaluating people appropriately, and providing care to them.”

According to the lawsuit, Edmo was denied parole for presenting herself as female. Edmo testified that in 2015, she attempted to castrate herself using a disposable razor blade. She removed one testicle during a second attempt in 2016. The testicle was repaired at a nearby hospital.

Prison officials have not said whether they will appeal the ruling.