US President Donald Trump has directed the Pentagon to reinstate indefinitely a ban on transgender people joining the US military.
But Mr Trump has left it to defence secretary Jim Mattis to decide whether openly transgender individuals already serving can remain, saying that until the Pentagon chief makes a decision "no action may be taken against" them.
The guidance reverses a year-old Obama administration policy that ended a ban on transgender people and set a July 2017 deadline for determining whether transgender people could be allowed to enter the military.
Mr Mattis had delayed that to January 2018, but Mr Trump has now instructed him to extend it indefinitely.
Jennifer Levi, an official at Glad (GLBTQ Legal Advocates & Defenders) has described the policy as;
"A shameful slap in the face to people who put their lives on the line everyday to defend our country, our military is strongest when all people who are fit to serve have the opportunity to do so. This unprecedented policy amounts to a purge of qualified, contributing troops, and will serve only to undermine unit cohesion and weaken military readiness."
A White House official who briefed reporters on the presidential order would not say whether Mr Trump would permit any exceptions.
The official said Mr Mattis has been directed to take a number of factors into consideration in determining how to deal with transgender individuals already serving.
Those factors are to include broad measures such as "military effectiveness", budgetary constraints and "unit cohesion", as well as other factors Mr Mattis deems "relevant".
It was not clear whether that means it is possible for Mr Mattis to come to the conclusion that some transgender troops should be allowed to remain.
Mr Trump gave Mr Mattis six months to come up with a policy on those currently serving, and he must implement it by March 23 2018, the official said.
The White House official said Mr Trump also directed Mr Mattis to halt the use of federal funds to pay for sexual reassignment surgeries and medication, except in cases where it is deemed necessary to protect the health of an individual who has already begun the transition.
That policy is to be written within six months and implemented by March 23.
In his directive to Mr Mattis, Mr Trump said he found that his predecessor's transgender policy was flawed.
"In my judgment, the previous administration failed to identify a sufficient basis to conclude" that ending the long-standing ban on transgender service would not "hinder military effectiveness and lethality" and be disrupting in the ranks, he wrote.
The Pentagon had little to say on the subject on Friday.
Dana White, the main spokeswoman for Mr Mattis, issued a two-sentence statement saying he had received White House guidance on transgender policy, adding, "More information will be forthcoming."
Just last week, Mr Mattis suggested he was open to the possibility of allowing some transgender troops to remain in uniform.
"The policy is going to address whether or not transgenders can serve under what conditions, what medical support they require, how much time would they be perhaps non-deployable, leaving others to pick up their share of everything."
Among those who have cheered Trump's tweet was Elaine Donnelly, president of the Centre for Military Readiness, who said he was halting "a massive social experiment".
"Expensive, lifelong hormone treatments and irreversible surgeries associated with gender dysphoria would negatively affect personal deployability and mission readiness, without resolving underlying psychological problems, including high risks of suicide," she said.
But Senator Tammy Duckworth, an army combat veteran, said the Pentagon should not exclude people based on gender status.
"If you are willing to risk your life for our country and you can do the job, you should be able to serve - no matter your gender identity or sexual orientation," she said.
"Anything else is not just discriminatory, it is disruptive to our military and it is counter-productive to our national security."