A federal appeals court on Monday restored a lawsuit filed by a Virginia inmate who claims her constitutional rights were violated when prison authorities refused to evaluate her for a sex-change operation.

The ruling by the 4th U.S. Circuit Court of Appeals allows Ophelia De'lonta, born Michael A. Stokes, to pursue her suit dismissed in U.S. District Court in which she alleges she was denied adequate medical treatment by the Virginia Department of Corrections.

According to the appeals court ruling, De'lonta, an inmate since 1983 serving 73 years for bank robbery, is a "preoperative transsexual suffering from a ... rare, medically recognized illness known as gender identity disorder."

De'lonta has attempted to castrate herself in an effort to perform her own sexual-reassignment operation.

A lower court judge dismissed her suit. On Monday, the appeals court held that although prisoners are not entitled to treatment of their choice, the treatment provided must be adequate to address a prisoner's serious medical needs.

Rebecca Glenberg, legal director of the ACLU of Virginia, said "the Court of Appeals recognized that prison officials may not arbitrarily refuse to consider sex-reassignment surgery."

The appeals court made it clear that it was not deciding whether she should prevail in lower court or to suggest any remedy -- presumably including surgery -- that might be in order should she win. ___

Also on HuffPost: