BOSTON -- A convicted murderer in Massachusetts says a judge's decision to grant her request for sex-reassignment surgery is "the right thing to do."

U.S. District Judge Mark Wolf ruled this month that the surgery is the only adequate treatment for Michelle Kosilek's gender-identity disorder, a condition he said is a "serious medical need." The ruling marks the first time a judge has ordered prison officials to provide sex-reassignment surgery.

Wolf's ruling prompted an outcry among some legislative leaders, who say Kosilek isn't entitled to the taxpayer-funded surgery.

Kosilek said she cried tears of relief after learning of the judge's ruling. Kosilek has waged a decades-long battle to complete the transformation from a man into a woman.

"This is who I am. My essence is female," Kosilek told The Associated Press in a recent telephone interview from prison.

"To those who don't understand gender-identity disorder, I understand that there is a reluctance to even think about this in a serious vein because to the average person who is uninformed, it may be truly bizarre, but this is who I am. This is who I have always been."

Kosilek was named Robert when married to Cheryl Kosilek and was convicted of her 1990 murder.

She said she endured decades of pain while growing up with a boy's body but feeling like she was a girl and later fighting to get sex-reassignment surgery. She has received female hormones and lives as a woman in an all-male prison in Norfolk.

Kosilek said she first began asking for the surgery while awaiting trial in the early 1990s but was turned down by county jail officials, even after she offered to pay for it herself. She filed her first lawsuit against the state Department of Correction in 2000. Two years later, Wolf ruled that Kosilek was entitled to treatment for gender-identity disorder but stopped short of ordering surgery.

Kosilek sued again in 2005, arguing that surgery was a medical necessity.

In his Sept. 4 ruling, Wolf found that the Department of Correction had violated Kosilek's Eighth Amendment right to adequate medical care.

Prison officials have repeatedly cited security risks in the case, saying that allowing Kosilek to have the surgery would make her a target for sexual assaults by other inmates.

Wolf, however, called the department's security claims a "pretext" and noted that the department's own medical experts testified that they believe surgery was the only adequate treatment for Kosilek, who has twice tried to commit suicide.

Kosilek said she believes corrections officials have taken a "deeply entrenched political stance" over the surgery and have fomented what she calls a "taxpayer rebellion" that has prompted some state lawmakers and U.S. Sen. Scott Brown to speak out publicly against her receiving the surgery.

State Sen. Bruce Tarr and about 50 other lawmakers have asked the department to appeal Wolf's ruling, while Brown called Wolf's decision "an outrageous abuse of taxpayer dollars."

Kosilek said all inmates are entitled to medical care and are routinely provided with heart surgery and treatment for other medical conditions.

"There is a general consensus in prison systems everywhere -- most notably here in Massachusetts -- that certain things just aren't going to be provided because they seem to be distasteful to a certain percentage of the population," Kosilek said.

"Nobody has ever started a taxpayer revolt about other prisoners receiving medical care, and the only consensus me and my sisters can come up with is this is just bigotry related to gender-identity disorder, and it's very troubling," she said.

Diane Wiffin, a spokeswoman for the Department of Correction, declined to comment, saying officials are still reviewing Wolf's ruling. She no decision has been made on whether to appeal Wolf's ruling.

Kosilek, 63, said she sees Wolf's ruling as "bulletproof" with no grounds for appeal. She said she is hoping the department will house her in a female prison after the surgery.

"It's just the right thing to do, to give me congruity," she said of the surgery.

"People need to understand that -- whether it troubles them or not -- it is a valid medical condition."