By Denise Lavoie, AP Legal Affairs Writer

BOSTON (AP) — A Massachusetts inmate who battled with state prison officials for 12 years says a judge’s decision to grant her request for sex-change surgery is “the right thing to do.”

Judge Mark Wolf ruled earlier this month that sex-reassignment surgery is the only adequate treatment for Michelle Kosilek’s gender-identity disorder, which he found was a “serious medical need.”

READ MORE: Worcester Woman Accused Of Drunk Driving After Crash Leaves Mass. State Police Trooper Injured

Wolf’s ruling prompted an outcry among some legislative leaders, who say Kosilek, a convicted murderer, is not entitled to the taxpayer-funded surgery.

Kosilek tells The Associated Press in a phone interview from prison that gender-identity disorder is a “valid medical condition,” though she knows some don’t view it that way.

READ MORE: 'It Will Ravage Your Whole Body': Framingham Man Recovering After 8 Months In Hospital Due To COVID-19

She said she’s entitled to medical treatment, just like other inmates.

Kosilek was named Robert when married to Cheryl Kosilek. He was convicted of killing her in 1990.

MORE NEWS: Gift Of Over $20 Million For Boston's Esplanade Would Fund New Visitors Center, Outdoor Spaces

Copyright 2012 The Associated Press.