BOISE, Idaho (KLIX) – A transgender inmate, who was born male but has been living for years as a woman, may become the first person in Idaho to receive transgender surgery while in prison.

Adree Edmo, 31, who remains anatomically male but identifies as a female, remains housed in the men’s facility of the Idaho Department of Corrections, but that may change after a U.S. District Court judge ruled that the person, barring any appeals, may receive transgender surgery.

Th ruling was handed down Thursday by Judge B. Lynn Winmill, according to a report by the Associated Press. It said that due to medical reasons, the surgery could help prevent further harm to Edmo.

Medical records indicate Edmo has been diagnosed with Gender Identity Disorder and Gender Dysphoria, according to online court documents from earlier this year, which state that Edmo first attempted self-castration on Sept. 29, 2015. Edmo had previously requested surgery and to be transferred to the women’s facility.

If the transgender surgery happens, Edmo would be the first Idaho inmate to receive it and, according to the Idaho State Journal, perhaps only the second in the country.

Edmo, also known as Mason Dean Edmo, has been imprisoned since 2012 for sexual abuse of a child under 16 in Bannock County, according to the Idaho Department of Corrections.

According to the Associated Press report, the state has six months to provide Edmo with the surgery.