Donald Trump has directed the Pentagon to extend indefinitely a ban on transgender people joining the US military, but appeared to leave open the possibility of allowing some already in uniform to remain.
The president gave defence secretary Jim Mattis authority to decide the matter of openly transgender individuals already serving and said that until the Pentagon chief made that decision "no action may be taken against" them.
The Obama administration changed the long-standing policy in June 2016, declaring that troops could serve openly as transgender individuals, 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 1 2018, but Mr Trump has now instructed him to extend it indefinitely.
But Mr Trump seemed to leave wiggle room for exceptions on transgender individuals already serving openly - thought to be in the low hundreds.
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.
In a tweet last month, Mr Trump said the government "will not accept or allow" transgender individuals to serve "in any capacity" in the military.
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," he said on August 14.
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."