A federal judge has called on lawyers for the state and for the prisoner who won the right to a taxpayer-funded sex change operation to negotiate a settlement for the prisoner’s legal fees, saying the state may be facing some hefty bills after losing the decade-long case.

US District Judge Mark L. Wolf said in an order issued over the weekend that Michelle Kosilek is entitled to be reimbursed for legal fees now that she has proved the state violated her constitutional rights by denying her a medically necessary procedure.

The judge noted that the state Department of Correction was ordered by a judge in another case to pay $237,999 in attorneys’ fees and $13,630 in additional costs to lawyers. In that case, which included a six-day trial, the department had unlawfully refused to provide daily halal meals — meals which met Islamic dietary guidelines — to Muslim prisoners.

Advertisement - Continue Reading Below

Kosilek’s case, which was first filed in 2000, has included multiple phases and many hearings. A trial lasted 28 days. Lawyers have so far handled her case at no charge.

“In this case … the amount of attorneys’ fees which Kosilek will be awarded is likely to be large,” the judge said.

The judge also noted that any litigation over the attorneys’ fees would only increase costs.

“Kosilek has prevailed on [her] claim that the defendant has violated [her] Eighth Amendment rights and is continuing to do so,” the judge said. “Therefore, [she] is eligible to be awarded [her] reasonable attorneys’ fees and costs.”

Wolf wrote in his ruling that Kosilek would have to officially request reimbursement for legal fees, and that the fees may be awarded unless the state could prove special circumstances that would relieve it of the obligation.

The judge has set a deadline of Oct. 4 for Kosilek to file a request for attorney fees, but he ordered that lawyers from both sides meet at least once before then to discuss a possible resolution. He also gave state officials until Oct. 9 to file an appeal.

Kosilek, now 63, was born Robert Kosilek, but by 1990 was transitioning to a female identity. She strangled her wife, Cheryl, in Mansfield that year.

During her trial, Kosilek wore women’s clothes. With her name legally changed to Michelle, she has been staying in a men’s prison in Norfolk while taking hormones and developing female physical qualities. Under Globe policy, Kosilek is being referred to as a woman because that is the gender with which she identifies.

In a controversial ruling earlier this month that generated headlines, Wolf ordered state officials to provide Kosilek sex change surgery, after finding that the treatment is the only adequate care for her serious mental illness, gender identity disorder.

He wrote that prison officials were being “deliberately indifferent” to Kosilek’s medical needs and violating her Eight Amendment protection against cruel and unusual punishment, noting that prison doctors recommended the surgery as the only treatment for a serious medical issue.