The First Circuit Court of Appeals in Boston on Tuesday overturned a ruling ordering Massachusetts prison officials to provide gender reassignment surgery to an inmate.

Born Robert, Michelle Kosilek is serving a life sentence in an all-male prison in Norfolk for the 1990 murder of her wife Cheryl.

A 3-judge panel of the First Circuit found that the surgery is necessary and that the state violated Kosilek's constitutional rights by refusing to provide her with the procedure.

The Massachusetts Department of Corrections (DOC) appealed the decision to the full court, which on Tuesday reversed itself in a split 3-2 ruling.

The court said that Kosilek had failed to demonstrate that denying the surgery was a violation of her constitutional rights.

Jennifer Levi, director of the Transgender Rights Project of Gay & Lesbian Advocates & Defenders (GLAD), which is working as appellate counsel in the case, said in a statement she was “appalled by the decision.”

“I am appalled by this decision, which means that Michelle Kosilek will continue to be denied the life-saving medical care she needs and has been seeking for years,” Levi said. “It is difficult or impossible to imagine a decision like this one – that second-guesses every factual determination made by the trial court – in the context of any other prisoner health care case. This decision is a testament to how much work remains to be done to get transgender people's health care needs on par with others in the general public.”

While in prison, Kosilek has twice attempted to take her own life and once attempted to castrate herself.