A federal appeals court is set on Thursday to hear arguments from prison officials in an appeal against a ruling that an inmate must be given gender reassignment surgery.

Judge Mark Wolf, of Massachusetts ruled in September 2012 that Michelle Kosilek should be given gender reassignment surgery in prison, as the “only adequate treatment” of her gender dysphoria. He also ruled that her legal costs should be covered.

Upon ruling on the surgery, Judge Wolf said: “there is no less intrusive means to correct the prolonged violation of Kosilek’s Eighth Amendment right to adequate medical care.”

Prison officials appealing the ruling and have already argued that they have security concerns, and are worried that they won’t be able to protect Kosilek in prison if she is given the surgery.

The ruling was upheld by the 1st US Circuit Court of Appeals in January, but the state appealed.

The Massachusetts Department of Correction has said it will continue to appeal, by requesting a hearing by the full court.

“While we acknowledge the legitimacy of a gender identity disorder diagnosis, DOC’s appeal is based on the lower court’s significant expansion of the standard for what constitutes adequate care under the Eighth Amendment, and on substantial safety concerns regarding Ms. Kosilek’s post-surgery needs,” the DOC said in a statement Friday.

Ms Kosilek was convicted of murdering then spouse Cheryl Kosilek back in 1990.