US President Donald Trump late on Friday rolled back his blanket ban on transgender people serving in the military - but they will still face major restrictions in the American armed forces.
Mr Trump signed a memorandum in August that effectively barred transgender people from the military, but the ban faced multiple legal challenges.
The White House has now come back with a modified version of the original plan - as with Mr Trump's efforts to ban travelers from several Muslim-majority countries, which was repeatedly challenged in court.
"I hereby revoke my memorandum of August 25, 2017, 'Military Service by Transgender Individuals,' and any other directive I may have made with respect to military service by transgender individuals," Mr Trump's new memorandum said.
President Trump instead sought to shift responsibility to two of his cabinet secretaries.
"The Secretary of Defense, and the Secretary of Homeland Security, with respect to the US Coast Guard, may exercise their authority to implement any appropriate policies concerning military service by transgender individuals," the memorandum said.
Mr Trump's memorandum said the two cabinet secretaries recommended that people diagnosed with gender dysphoria be barred from military service.
The Defense Department released a copy of a report with further details on the restrictions outlined in the memorandum.
"Transgender persons who have not transitioned to another gender and do not have a history or current diagnosis of gender dysphoria...are eligible for service" if they meet mental and physical health standards and "are capable of adhering to the standards associated with their biological sex," the report said.
People who have undergone gender transition treatment are barred because it may not "fully remedy...the mental health problems associated with gender dysphoria," the report said, also noting the time required for treatment.
"Although the precise number is unknown, the department recognises that many transgender persons could be disqualified under this policy," it said.
The number of transgender troops among America's approximately 1.3 million active duty service members is fairly small, with estimates topping out at 15,000.
There are some exceptions to the restrictions: people who have a history of gender dysphoria may join the military if they "can demonstrate 36 consecutive months of stability - i.e. absence of gender dysphoria - immediately preceding their application," the report said.
And those diagnosed with gender dysphoria after joining the military who do "not require gender transition" may remain.
There is also an exception for people currently in the military who were diagnosed with gender dysphoria between the implementation of an Obama-era policy allowing transgender people to serve and the start of the new Trump administration policy.
But the US Senate's top Democrat Chuck Schumer said the policy still amounted to a ban, calling it "yet another Trump-Pence decision intended to drive a wedge in our society."
"No matter what @realDonaldTrump says, this is a transgender ban - plain and simple," Mr Schumer tweeted. "This decision breaks faith with those serving today and those who aspire to serve."
The American Civil Liberties Union rights group condemned the new policy, calling it "transphobia masquerading as policy."
"This policy is not based on an evaluation of new evidence," the ACLU's Joshua Block said in a statement.
"It is reverse-engineered for the sole purpose of carrying out President Trump's reckless and unconstitutional ban, undermining the ability of transgender service members to serve openly and military readiness as a whole."
"The policy effectively coerces transgender people who wish to serve into choosing between their humanity and their country."
The Human Rights Campaign, a major LGBTQ rights group, also took aim at the restrictions.
"There is simply no way to spin it, the Trump-Pence Administration is going all in on its discriminatory, unconstitutional and despicable ban on transgender troops," the organisation's president Chad Griffin said.