U.S. Army Reserve Capt. Sage Fox is transgender. After she legally changed her gender from male to female, her battalion commander said she’d be welcome to serve as a female officer, she says. Two weeks later, she says, she was put on inactive status. (Preston Gannaway/For The Washington Post)

Capt. Sage Fox had come to terms with the end of her military career when she said she got a stunning phone call. It was her commanding officer, telling her that despite the military’s ban on transgender service members, she would be welcome to return— as a female, her preferred gender.

So Fox, 41, a U.S. Army Reserve officer who had served in the military for 14 years, returned to post in Sacramento as a new person. Her voice was higher with the help of vocal training and her features softer as a result of hormone therapy. She had grown out her hair. She got permission to use the female latrine and be addressed as “ma’am.”

But a short time later, her orders were reversed without explanation, and she was told not to come back, she said.

Thousands of men and women serving in the U.S. military are in such precarious positions, caught in the gap between shifting cultural mores and military regulations that still require the immediate dismissal of any service member found to be transgender.

This confusing situation results in part from a widespread expectation that the Pentagon will lift the ban on transgender service, just as Congress three years ago repealed “don’t ask, don’t tell,” the policy that barred gays from serving openly.

Defense Secretary Chuck Hagel indicated this year that he is open to studying the transgender ban, which could be eliminated administratively, and the White House expressed support for such an examination. House Minority Leader Nancy Pelosi (D-Calif.) recently called for the prohibition to be lifted.

But the ban remains firmly in place, with about two dozen service members known to have been discharged over the past two years, according to advocates. The Pentagon has said there is no formal review underway, and last week, White House press secretary Josh Earnest said he does not know if President Obama will seek to overturn the ban before his term ends.

“I think there’s a false sense of security, and part of that is that everybody involved, from the secretary of defense to me and all these service members, we all know it’s inevitable [that the policy will be changed] and it’s inevitable relatively soon,” said Mara Keisling, executive director of the National Center for Transgender Equality. “In the meantime, there’s all these service members who are at great risk.”

In Fox’s case, she was not discharged but rather shifted to the Individual Ready Reserve, meaning she could be called back to duty but would not show up for training, draw a paycheck or have access to health benefits. When she reached the commanding officer who had been so encouraging, he was brusque. “You don’t get it,” she recalls him saying. “Don’t come tomorrow. Take the orders and go away.”

An Army spokesman declined to discuss the details of individual cases but provided a publicly available profile of Fox that corroborated parts of her account.

The transgender ban is not a top priority for the military right now, as a conflict with the Islamic State rages in Iraq and budget cuts loom, said retired Army Maj. Gen. Gale S. Pollock, who co-authored a report by several senior retired military officers this year that found lifting the ban would cause no major problems. Moreover, the military is already grappling with a separate set of gender-related questions centered on how to expand women’s roles in combat.

“I think the military is going to do the right thing. I just don’t think it’s going to happen in the short term that we might like,” Pollock said. In the meantime, she said, she would advise transgender service members to remain in the closet. “Stay quiet, stay the course.”

About 15,500 transgender people are serving in the military, according to the Williams Institute, a think tank at UCLA that addresses lesbian, gay, bisexual and transgender issues. They are believed to have an outsize presence in the military, as many young people struggling with their gender identity are drawn to its masculinity and job prospects.

Many of these members have been serving for some time when they realize they are transgender, at which time they face a tough choice: abandon their careers or suppress their identities.

An increasing number of people are choosing to open up while actively serving, confiding their gender-identity issues to peers, supervisors and military doctors, many of whom are looking the other way, advocates say. In interviews, several current and former transgender service members say they have noticed a greater acceptance as a younger generation advances in the ranks and fallout from the lifting of “don’t ask, don’t tell” proves minimal.

The disconnect between that acceptance and policies that haven’t changed is leading to some awkward situations. Service members are not permitted to take hormones to change their gender, but some have done so anyway. The treatments make them appear more like their preferred gender, yet they still must wear clothing and use bathrooms according to their enlisted gender. Masculine-looking service members report having to awkwardly correct underlings who call them “sir.”

Hunter, 27, a soldier based in Texas, is a transgender man who “presents very male,” he said, with close-cropped hair and a masculine bone structure brought on by testosterone treatments. Typically this does not present a problem, since he works in mixed-gender settings where the clothes are gender neutral. But he is required to use the female latrine and has had women flee when he enters. While in officer school, he occasionally had to attend formal dinners that required him to wear a form-fitting jacket and skirt.

“I just kind of own it,” he said. “It makes some people uncomfortable, but this is 2014. You shouldn’t be afraid to see a man in a skirt.”

Hunter spoke on the condition that his last name be withheld to avoid being targeted for discharge.

Capt. Jacob Eleazer, 29, of the Kentucky Army National Guard, who joined the military as a woman, said he came out to his commanding officer as transgender man in February, when the weight of keeping it secret became too much. He was told to turn in his gear and bade emotional goodbyes to his unit — only to have the order rescinded a month later without explanation.

Today, Eleazer is in charge of training new officers in the Kentucky National Guard. He serves as a woman and is supposed to be addressed as “ma’am,” even though his official military record reflects his male name. “My students asked for permission to call me by male pronouns,” he said. “They got shot down.”

But even some with strong advocates within the military have been squeezed out. Devon Allen, 24, a former Marine stationed in Okinawa, Japan, had secretly begun hormone therapy when he said a couple of members of his unit reported to their superiors that there was a woman in their ranks who wished to live as a man.

Several of his superiors met with him to offer their support, he recalled. One military lawyer even expressed a desire to use Allen’s case as an example to show why open transgender service should be permitted, he said. But that effort fell apart. His commanding officer, who had been supportive of his transition, finally asked that he discontinue his medications.

He agreed but fell into a depression and decided to quit, he said. “Being a Marine is a big part of who I am as a person, but living that double life is stressful, and no one should have to live that,” he said.

Fox, the U.S. Army Reserve captain from Sacramento, was on deployment in Kuwait in 2012 when she had her epiphany about her gender identity. She decided to take a break from service, to grow out her hair and start hormones. But a few months later, she was told that she had to return to her unit.

She confided to her superiors that she had legally changed her gender and did not want to be reactivated and risk running afoul of the transgender ban. To her surprise, she said, her battalion commander responded that she would be welcome to serve as a female officer. A day later, she was on post, full of optimism that she could still serve her country while embracing her identity.

That lasted two weeks, she said. She was not discharged but put on inactive status without the routine, thorough medical review that would help her qualify for disability payments for injuries not related to her transition, she said. Her superiors stopped returning her phone calls and e-mails.

The experience prompted Fox to become an activist for transgender rights in the military, but it has also taken a toll on her personal life. She has had difficulty finding work because she has been ostracized by the military and because the fact that she is transgender can be easily learned through Google, she said. She is on the verge of homelessness.

She said she would jump at the chance to pick up her career where she left off. “I’d be happy to serve until I was 62 if I could,” she said. “It gets in your blood.”

Dan Lamothe contributed to this report.