BOSTON -- State prison officials must provide taxpayer-funded sex-reassignment surgery to a transgender inmate serving life in prison for murder, because it is the only way to treat her "serious medical need," a federal judge ruled Tuesday.

Michelle Kosilek was born male but has received hormone treatments and now lives as a woman in an all-male prison. Kosilek was named Robert when married to Cheryl Kosilek and was convicted of murdering her in 1990.

U.S. District Judge Mark Wolf is believed to be the first federal judge to order prison officials to provide sex-reassignment surgery for a transgender inmate.

Kosilek first sued the Massachusetts Department of Correction 12 years ago. 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 the surgery is a medical necessity.

In his 126-page ruling Tuesday, Wolf found that surgery is the "only adequate treatment" for Kosilek and that "there is no less intrusive means to correct the prolonged violation of 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.

But Wolf, who was appointed to the federal bench by President Ronald Reagan in 1985, found that the security concerns are "either pretextual or can be dealt with." He said it would be up to prison officials to decide how and where to house Kosilek after the surgery.

Diane Wiffin, a spokeswoman for the prisons department, said the agency would have no immediate comment on the ruling.

"We are reviewing the decision and exploring our appellate options," Wiffin said.

In a telephone interview last year with The Associated Press, Kosilek said the surgery is a medical necessity, not a frivolous desire to change her appearance.

"Everybody has the right to have their health care needs met, whether they are in prison or out on the streets," Kosilek said. "People in the prisons who have bad hearts, hips or knees have surgery to repair those things. My medical needs are no less important or more important than the person in the cell next to me."

Wolf noted that the Department of Correction's own medical experts testified that they believe surgery was the only adequate treatment for Kosilek.

The department's ex-commissioner Kathleen Dennehy testified that giving Kosilek the surgery would present insurmountable security concerns, but Wolf said the inmate had proven that those purported concerns masked the real reason for denying surgery: "a fear of controversy, criticism, ridicule and scorn."

Kosilek's lawsuit has become fodder for radio talk shows and Massachusetts lawmakers who say the state should not be forced to pay for a convicted murderer's sex-change operation – which can cost up to $20,000 – especially since many insurance companies reject the surgery as elective.

House Republican Leader Bradley Jones said it is difficult for him to believe that a sex-change procedure is medically necessary.

"It's one thing to say, `I have cancer and am in need of treatment,'" Jones said. "It seems to be more medically desirable than a necessity." He also worried that the decision could open up a "Pandora's box" of requests for medical procedures from other inmates.

In 2008, Republican lawmakers, including then-state Sen. Scott Brown, filed legislation to ban the use of taxpayer funds to pay for the surgery for prison inmates. The amendment did not make it into law.

Brown, now in the U.S. Senate, said Tuesday that the surgery would be "an outrageous abuse of taxpayer dollars."

"We have many big challenges facing us as a nation, but nowhere among those issues would I include providing sex change surgery to convicted murderers," Brown said in a statement. "I look forward to common sense prevailing and the ruling being overturned."

Inmates in Colorado, California, Idaho and Wisconsin have sued unsuccessfully to try to get the surgery, making similar arguments that denying it violates the U.S. Constitution's protection against cruel and unusual punishment.

Wolf noted that Kosilek's gender-identity disorder has caused her such anguish that she has tried to castrate herself and twice tried to commit suicide.

Kosilek's lead attorney, Frances Cohen, called the decision courageous and thoughtful.

"We feel very grateful that the judge listened very carefully to the medical experts and has given Michelle Kosilek what the prison doctors had recommended," Cohen said.

Ben Klein, a senior attorney at the Boston-based legal group Gay & Lesbian Advocates & Defenders, said Wolf's ruling recognizes what some medical experts have said for years: that sex-reassignment surgery can be a "legitimate life-saving medical treatment for transgender people."

Klein said other inmates seeking the surgery can cite Wolf's ruling, but they would still have to prove that prison officials showed deliberate indifference to their medical needs.

"Not everybody will be able to prove it, but at the same time, the prisons' decisions have to be based on proper medical care and not bias," Klein said.

In Kosilek's case, the judge said, female hormones have "helped somewhat," but the inmate "continues to suffer intense mental anguish" because she truly believes she is a woman trapped in a man's body.

"That anguish alone constitutes a serious medical need," Wolf wrote. "It also places him at high risk of killing himself if his major mental illness is not adequately treated."

Earlier on HuffPost:

Loading Slideshow...
  • 1. Defining Transgenderism

    The root of the word "transgender" comes from the Latin word "trans," meaning "across." A trans-Atlantic flight goes across the Atlantic Ocean; a transnational issue affects people all across the country; and so on. "Transgender" literally means "across gender." "Transgender" is defined today as an umbrella term with many different identities existing under it. <em>Image via ccharmon on <a href="http://www.flickr.com/photos/9439733@N02/4922468556/" target="_hplink">Flickr.com</a></em>

  • 2. A Few Words Of Advice

    When trans people reveal their trans identity to someone, it is a highly personal moment. It takes trust and courage to talk about gender identity or gender transition. The best-case scenario is probably to: 1) ask what questions, if any, are appropriate; and 2) give the trans person an out if he or she feels like you are overstepping your bounds (even though your questions may be born of an innocent curiosity). This makes it easier for a trans person to maintain privacy and integrity.

  • 3. The Gender Binary

    The gender binary exists for easy categorization and labeling purposes. For most people, it is something that is taken for granted. Females who identify as women use the women's restroom. Males who identify as men dress in suits and ties or tuxedos for formal events. It is the way it is, and that fits well for many people. But for trans people living in a culture where the gender binary rules all, it is a daily battle. <em>Image via kimberlykv on <a href="http://www.flickr.com/photos/kimberlykv/2681705695/sizes/z/in/photostream/" target="_hplink">Flickr.com</a></em>

  • 4. Gender Expression

    Out of the three terms -- "sex," "gender identity," and "gender expression" -- which do you think we notice most about people on a daily basis? If it were a person's sex, then we would have to see under that person's clothes or test his or her chromosomes (and even then we could get a conflicting report). If it were a person's gender identity, we would have to either ask that person how he or she identifies or somehow get inside the brain and find the answer for ourselves. By process of elimination, you guessed it: it's gender expression. <em>Image via MuLaN™ on <a href="http://www.flickr.com/photos/mulan5/1586972480/sizes/z/in/photostream/" target="_hplink">Flickr.com</a></em>

  • 5. Orientation And Gender

    If we look at society as a diverse group of individuals where heterosexuality might be the most common sexual orientation but not necessarily normal, then we can more easily see that human sexual orientation varies: some people happen to be straight, some gay, some bisexual, and so on. This does not necessarily have anything to do with a person's gender identity or expression.

  • 6. Coming Out To Oneself

    Realization that one is trans can take anywhere from a few moments to several decades. Usually, trans people have an inkling early on in their lives that their assigned gender feels out of sync with their bodies. The self-realization process is extremely complicated. The human mind does its best to help us survive, which can translate into triggering intense denial. Because of societal constraints, it is common for a person to try to ignore signs pointing toward transgenderism, whether consciously or unconsciously.

  • 7. Surgeries

    Health insurance covers transgender surgeries in very few cases. Some people have fewer surgeries than they would like because of the high prices. Still other trans people elect not to have surgery at all because they simply do not want to. For a long time, and still in many places today, people refer to some transgender surgery as "sex-change" surgery. Later on came the less-harsh sounding "sex-reassignment surgery." Today, more and more people are realizing that surgery for trans people is not a gender "reassignment" but rather an affirmation of the gender that a person has always been. Gender-affirming surgery seems to be the most accurate reflection of this.

  • 8. Hormonal Transition

    For trans women, taking hormones is a two-step process. To help feminize a genetic male, it is very important to suppress production of testosterone. The other step that transgender women frequently take is the administration of estrogen, which is the chief hormone at work in biological females. Unlike their male-to-female counterparts, trans men do not have to take any estrogen-suppressing substances as part of their hormone treatments. Testosterone (called simply "T" in the female-to-male community) is a powerful hormone. The raising of testosterone levels in a trans man overpowers existing estrogen levels.

  • 9. Transgender Children

    There can't really be transgender children, can there? Kids can't know for sure how they feel when they're really young, right? Wrong. Gender identity is thought to be solidified by age 6. This does not mean that children absolutely, positively know how they identify by that age. It simply means that their gender identity is there. If it doesn't match up with the sex they were assigned at birth, then that will start to manifest itself in different ways. <em>Image via libertygrace0 on <a href="http://www.flickr.com/photos/35168673@N03/3595145967/sizes/z/in/photostream/" target="_hplink">Flickr.com</a></em>

  • 10. Sex, Gender And Nature

    Many plants and animals can be both male and female, biologically speaking, at the same time or at different points in their lives. In a comparison of 34 postmortem human brains, scientists found that the part of the brain comprising a small group of nerve cells thought to pertain to gender and sexuality were similar in trans women and non-trans women. Although the study only had one trans man's brain, it found that group of nerve cells to be similar to that of a non-trans man. Perhaps Dr. Milton Diamond put it best when he said, "Biology loves variation. Biology loves differences. Society hates it."

  • 11. Transgenderism As A Mental Health Issue

    Gender identity disorder (GID) appears in the Diagnostic and Statistical Manual of Mental Disorders (DSM-IV), which is the American Psychiatric Association's official diagnostic book. GID, soon to be changed to gender dysphoria in the DSM 5, is classified as a mental health condition in which a person desires to be the "opposite" sex of that assigned to him or her at birth. Due to its criteria, many trans people fall under this diagnosis. <em><strong>Update</strong>: The latest edition of the mental health manual used by psychiatrists to diagnose disorders reveals a change in thinking on gender identity. The perspective change is similar to a decision made in 1973, when the American Psychiatric Association eliminated homosexuality from its disorders' list. <a href="http://www.huffingtonpost.com/2013/06/04/gender-dysphoria-dsm-5_n_3385287.html" target="_blank">See more here. </a></em>

  • 12. The Bathroom Debacle

    Imagine resigning yourself to not ever using the bathroom in a public place. For trans people, this is often a reality. Those who are in transition or do not pass on the outside as "clearly male" or "clearly female" are thrown out of both men's and women's restrooms on a daily basis. Some places provide "unisex" or "family" restrooms, but the majority do not. If a transperson wants to go out and enjoy a concert, sporting event, or simply a day outside the home, he or she must make concessions that most people never have to think about.

  • 13. Lesser-Known Types Of Transgenderism: Genderqueerism

    People often find the notion of genderqueerism difficult to understand. They may hear that a genderqueer person is in between male and female, or is neither, but they may continue to ask, "OK, so what sex or gender does that make them, really?" This is where it is perhaps most difficult to live as a genderqueer person. The constant explanations that sometimes get nowhere can be frustrating and disheartening for genderqueer people.

  • 14. Transgender By The Numbers

    Unfortunately there is no major consensus on the number of transgender people in the United States or the world today. Hard-and-fast statistics are lacking for a couple of reasons. One is that many trans people are not out and are either living as trans behind closed doors or living stealthily, meaning that people do not know that they were born differently than they appear now. Another reason for the lack of statistics is that so many different varieties of transgenderism fall under the umbrella term that it is hard to discern which subcategories should actually be statistically counted as transgender and which should not.

  • 15. Parting Words

    In America we have seen that teenage suicide because of bullying has reached epidemic proportions. Many of these kids are LGBT, and most of them are taunted due to some component of their gender expression. I hope that you will talk to others about what you have learned about transgenderism. No one should have to suffer because of who he or she is, but we know that reality tells us differently. People have been bullied and persecuted for who they are since the dawn of time. But we are not defenseless. The more education that is out there about what is means to be different, the better.