One of the sadder things about the life of Chelsea, formerly Bradley, Manning is that she always seems to have been in the wrong place—at a time when there surely is a right place for her. As a kid, Manning was a gay, geeky, opinionated atheist growing up in a conservative Oklahoma town she once described as having “more pews than people.” She was all those things—and a foreigner, too—in the next place she lived, Haverfordwest, Wales, where Manning moved with her mother, an alcoholic who struggled with everything. She was all those things, plus cross-dressing and opposed to the war in Iraq, while she was deployed to Baghdad, working in computer intelligence to advance that very war. A profile of Manning that ran in the Times in 2010 described a brief period when she was hanging out in Cambridge, Massachusetts, with a boyfriend, a student at Brandeis who was a classical-music-loving, self-described drag queen, and the boyfriend’s circle. Reading about that interlude, it’s hard not to think this was where Manning belonged, with the kind of cyber-nerds and gender activists who feel most at home in the penumbra of a college campus. If only she’d been on a track to join that milieu, as opposed to, say, the Army, where she was stranded with people she saw as “a bunch of hyper-masculine trigger happy ignorant rednecks,” things would have turned out so much better—at least for Manning. Whether we would have ever found out some of the things Manning leaked that we deserve to know about the prosecution of the wars in Iraq and Afghanistan is another matter.

Now Manning has announced that she is transgender and will henceforth be known as Chelsea, and referred to with feminine pronouns, just after having been sentenced to thirty-five years at Fort Leavenworth. A military prison, it is reputedly a worse place to be incarcerated if you are a trans person than a federal or state prison. “The Army does not provide hormone therapy or sex reassignment surgery for gender identity disorder,” Kimberly Lewis, a spokeswoman for Fort Leavenworth, told NBC News.

To many people—those who aren’t crazy about the idea of providing prisoners with health care at all, let alone health care for gender dysphoria, or those who consider Manning a traitor and thus deserving of whatever indignities can be heaped upon her—that’s no surprise and just as it should be. But that kind of blanket denial of treatment is very much at odds with principles established for non-military prisons, which in recent years have largely accepted the idea that trans people are entitled to hormones and in some cases surgery while incarcerated. Increasingly, the view is that denying such care to inmates with diagnosed gender identity disorders may be considered cruel and unusual punishment.

In 2010, a settlement reached in a case called Adams v. Federal Bureau of Prisons held that treatment for gender identity disorder could not be frozen at whatever level it was before a trans inmate entered a federal prison, a common practice up till then. Not having started hormone treatment or having been diagnosed with a gender disorder while on the outside would no longer preclude getting such services while behind bars. (Manning, as it happens, had already been given her diagnosis—by an Army psychologist.) In 2011, the A.C.L.U. and Lambda Legal successfully challenged a Wisconsin law that prevented doctors from prescribing hormones or sex-reassignment surgery to prisoners. As Jennifer Levi, an attorney with Gay and Lesbian Advocates and Defenders, told me, “Every time courts have considered this question, they’ve acknowledged that gender identity disorder or dysphoria is a real and serious medical condition and that denying care for it has constitutional, Eighth Amendment implications.”

A piece of legislation called the Prison Rape Elimination Act has also affected the lives of trans inmates in civilian prisons. An unusual array of organizations on both the left and the right—Amnesty International and the Concerned Women for America, the N.A.A.C.P. and Focus on the Family—supported the legislation, which was aimed at monitoring and reducing sexual abuse in prisons. The bill passed by unanimous vote in both the House and Senate in 2003, and in 2012, the Department of Justice issued a set of rules for implementing it. The wait was long, but the rules were remarkably forward-looking. And they had particular significance for L.G.B.T. people, who experience sexual assault in prison at much higher rates than heterosexual inmates do. According to a 2012 Bureau of Justice Statistics survey, for instance, 3.5 per cent of heterosexual men reported being sexually abused by another inmate, compared to thirty-nine per cent of gay men. Prison is far from a haven for gay or gender-nonconforming people. (That should not be necessary to point out, and yet somehow the Daily Beast ran a column last week that in its original form suggested Chelsea Manning might enjoy the sexual opportunities in prison; it has since been amended.)

The new rules say that officials in civilian prisons (or county jails or juvenile-detention facilities or short-term police lock-ups) must determine on a case-by-case basis where to house a trans inmate—in a male facility or a female one, and in what kind of rooming arrangement—and that the decision must take into account “the individual’s own perception of their vulnerability.” They stipulate that prisons should not always resort to protective custody for trans inmates, since that means consigning them to isolation, but should consider other options, such as relocating an abuser, changing cellmates, or placing the trans inmate in a single-occupancy cell in the general population. They call for reassessing the placements at least twice year, to take into account, for example, changes in appearance or medical status. Staff are to be trained in recognizing and preventing sexual abuse and also in “interacting professionally with L.G.B.T. and gender nonconforming people.” And if prisons are found to be out of compliance with these rules, they pay a financial penalty. As Terry Schuster notes on the Web site of The Atlantic, “Taken together, these policies and training requirements are more comprehensive than those required in most schools and workplaces.”

Private Manning is in the wrong place again. But for once, it may not be the wrong time. Nor is she alone and invisible, as so many prisoners are. The next chapter of Manning’s story may start a discussion not about Iraq but about our prisons at home. If she were to sue for the right to treatment for her gender dysphoria, she might just win.

Photograph by Jonathan Ernst/Reuters.

This post originally misidentified the publication that suggested Manning might enjoy the sexual opportunities in prison. The column in question ran in the Daily Beast, not the Huffington Post.