Trump said the ban would save on the 'tremendous' medical costs and disruptions that transgender personnel could create.
Washington: President Donald Trump's announcement that transgender troops are no longer welcome in the US military caught the Pentagon off guard, leaving officials scrambling for a coherent response.
Trump's tweeted decree upended years of progressive personnel reform in the military, which in recent years has opened the door for women to fight in front-line combat roles and lifted a ban on gay people openly serving.
Here's a look at the legal and political minefield the Pentagon must now clear if it is to implement Trump's ban:
What prompted the ban?: Trump said the ban would save on the "tremendous" medical costs and disruptions that transgender personnel could create.
But a Rand Corporation study said only a small portion of service members would ever seek gender transition affecting their deploy ability or health costs, adding between $2.4 million and $8.4 million to the Pentagon's more than $600 billion budget.
According to The New York Times and other US media, Trump's ban was driven by politics. A spending bill that included money for a wall along the US-Mexico border and other signature Trump pledges also included an amendment barring the military from paying for transgender medical treatment.
The Times cited a source who said Trump was worried the amendment could delay the spending bill. So, rather than dealing with the issue, Trump made it moot by barring transgender people altogether, the Times reported.
What's the legal impact?: On June 30, 2016, then defense secretary Ash Carter said the military could no longer discharge or deny re-enlistment to troops based solely on their gender identity.
That means transgender troops who were encouraged to come out under one administration now face getting booted under another a potential legal quagmire for the Pentagon.
Already, advocacy and civil rights groups are drawing up court challenges. OutServe-SLDN which works to end military discrimination and civil rights litigators Lambda Legal have said they are ready to sue.
"If this disgraceful tweet actually becomes policy, we will sue in a heartbeat," said Lambda legal director Jon Davidson. The American Civil Liberties Union said it was examining options on how to fight the ban, and called for anyone affected to contact the organization.
The Pentagon has a long history of exclusionary policies, including racial segregation, bans on gays and barring women from combat roles. Those prohibitions were all scrapped over time.
Recruitment repercussions: The number of transgender troops among America's 1.3 million active duty service members is small, with estimates ranging from between 1,320 and 15,000.
While losing troops would have an impact on some units, observers also worry about the knock-on effects, particularly among millennials who may no longer consider joining an organization with discriminatory policies.
To choose service members on other grounds than military qualifications is social policy and has no place in our military," Carter said following Trump's announcement.
"This action would also send the wrong signal to a younger generation thinking about military service."
What now?: Trump apparently tweeted his announcement with little or no coordination with the Pentagon.
Public affairs officials on Wednesday refused to return calls or worked behind closed doors, and a promised statement that was supposed to offer clarity on how the ban might be implemented never arrived.
Pentagon chief Jim Mattis was on holiday when the tweets landed and it appears he was informed of the decision only after it was made.
General Joe Dunford, who is Chairman of Joint Chiefs of Staff, said in a short memo to service heads and senior enlisted leaders Thursday that the current policy should remain in effect until Trump had given formal direction to the Pentagon and Mattis issues new guidance.
"In the meantime, we will continue to treat all of our personnel with respect," Dunford wrote. As of Thursday afternoon, the Pentagon's existing guidelines on transgender policy remained on its website.