STORKOW, Germany — On July 26, when President Trump unexpectedly tweeted his plans to ban transgender servicemen and women from the U.S. military, Anastasia Biefang was more than 4,000 miles away from Washington. Still, she could not hide her shock.

“It felt like a smack in the face,” said the 43-year-old German army officer, who is the first transgender person to command a military unit in the country's history.

Biefang joined the German army as a man more than 23 years ago. Two years ago, despite fearing negative repercussions for her career, she came out to her superiors and eventually to her entire unit. Her decision to transition from male to female coincided with an unprecedented openness among top military officials in Germany, the United States and other countries to having transgender troops serve openly.

Since then, the United States and Germany have taken dramatically different turns. Biefang, now a lieutenant colonel, commands an information technology unit of more than 700 soldiers, and the Bundeswehr, Germany's military, heralds her as a national role model. She is the first transgender commander in a force headed by a defense minister, Ursula von der Leyen, who has made support for transsexual and homosexual personnel a top priority.

“People who hold fears aren’t able to give their very best. We can’t afford that,” von der Leyen said in January. She largely echoed similar remarks by then-U.S. Defense Secretary Ashton B. Carter, who explained the decision to drop the American ban on transgender military service in 2016 by saying that “our mission — which is defending the country — has to come first.”

Trump came to a different conclusion.

In his July tweets, the president argued that “tremendous medical costs and disruption” were behind his decision to reinstitute the ban on transgender servicemembers — though a federal judge in Washington blocked Trump's policy last month, writing that there is "absolutely no support for the claim that the ongoing service of transgender people would have any negative effect on the military at all."

Trump’s battle to ban transgender servicemen and women is also feeding into a growing perception in Germany that Europe can no longer trust the United States as a reliable partner that shares its values. And while estrangement between Washington and its European allies partially dates back to the Iraq War, it has gained new momentum in the era of Trump.

In May this year, German Chancellor Angela Merkel offered a particularly blunt rebuke of Trump, saying that the days when her continent could rely on others were “over to a certain extent." Merkel demanded in the same speech that Europe “really must take our fate into our own hands.”

At least 18 countries allow transgender service members to serve openly, including ten NATO members: the Netherlands, Norway, Belgium, the Czech Republic, Denmark, Estonia, Britain, Spain, France and Germany. Their overall assessment is that allowing transgender service members to serve openly can be an advantage to their armed forces, according to a Rand Corp. report released last year. “None of the militaries that we examined reported a negative impact on the operational effectiveness, operation readiness, or cohesion of the force,” said political scientist Agnes Gereben Schaefer, who co-wrote the study.

“Many U.S. allies lifted their bans on allowing transgender service members to serve openly many decades ago,” she pointed out.

In Germany, a long road to change

In Germany, LGBT troops were banned from the top ranks of the military until about two decades ago. That reinforced the fears of many of the estimated 1,300 transgender people serving in the German military that coming out would result in discrimination and damage to their careers. Historians have not found any records of transgender service members who came out while serving before the ban was dropped about 20 years ago.

Biefang remembers this period all too well. She joined the military when LGBT troops were still banned from the top ranks and, for almost two decades, a time she now describes as a “tale of woe," she led a double life. During the day, she presented herself in her role as a husband and career-oriented soldier. After work, she made her way to a cupboard in which she hid her female clothes.

Then, in 1999, the European Court of Human Rights ruled that homosexual soldiers could not be disadvantaged, and the Bundeswehr and other European militaries were forced to fully accept LGBT troops among their ranks. Existing restrictions had to be lifted "despite resistance of the top generals," said Klaus Storkmann, a military historian. Since then, he said, the Bundeswehr has made major progress in fighting discrimination, both from the top of the hierarchy and through grass-roots LGBT associations.

That transformation initially proceeded slowly, but it sped up after the German government’s decision to abandon conscription six years ago. Since then, the military here relies on volunteers but faces a constant shortage of applicants. Its struggle to recruit young Germans has led the military to rebrand as a family-friendly and tolerant organization to compete with leading corporations and start-ups.

Biefang decided to come out in 2015. "I finally reached the point where I realized that I couldn't continue with this," she said. "The mechanisms I had developed to deal with it didn’t work any longer and I was really unhappy with myself."

To her surprise, Biefang’s superiors supported her decision — even as they acknowledged that they had never dealt with a similar case and that her transition at work would have to be a joint effort. “For example, nobody could say at what point [during my transition] I would start being allowed to change my hair," Biefang recalled. "There were no concrete guidelines at the time, so I developed them together with my superiors."

She has since become an outspoken critic of Trump’s stance on transgender military service.

Biefang rejects Trump’s argument that transgender service members are too expensive as an “awful debate,” and suggests that the opposite is the case. “What do I win as an employer if I have someone who’s forced to hide his or her private life?” she said. “If you tell people that they are being accepted the way they are, that will create a really strong bond between an employer and an employee.”

Read more: