In a sudden reversal of an Obama-era decision made just last year, President Donald Trump tweeted Wednesday morning that transgender individuals will no longer be allowed to serve in the U.S. military “in any capacity.”

As rationale for the change, which arrived with little warning, Trump cited his belief that the military “cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail.” He also added that “generals and military experts” helped him reach this decision.

Following a yearlong study on transgender service members and the military, then-Defense Secretary Ash Carter announced in June 2016 that he would allow people of all gender identities to openly serve in all branches of the military and ensure that trans service members weren’t discharged due to their gender identity.

Though Carter technically lifted the ban immediately, the decision has yet to fully go into effect. At the time, he said the military needed another 12 months to implement all of the needed adjustments, like crafting guidance for commanders and training service members to understand issues facing trans people.

Then, on June 30, Defense Secretary Jim Mattis extended that timeline by six months — despite the Chairman of the Pentagon’s Joint Chiefs of Staff having said he had no plans to change the policy 11 days earlier. The extra time, Mattis said, would allow the military to assess whether allowing transgender individuals into the army would impact its “readiness and lethality.” The military was expected to have reviewed the role and cost of trans individuals to the army and produce a memo for Mattis by December.

When Trump tweeted the shift Wednesday morning, Mattis was on vacation, although he reportedly knew the announcement was coming. The Pentagon, however, was caught off-guard, an official told CNN’s Barbara Starr. All public information officers at the Pentagon are currently directing media inquiries about the policy change to the White House:

We refer all questions about the President’s statements to the White House. We will continue to work closely with the White House to address the new guidance provided by the Commander-in-Chief on transgender individuals serving the military. We will provide revised guidance to the Department in the near future.

Despite Trump’s decision, an estimated 1,320 to 6,620 transgender individuals already serve on active duty in the military, according to a report by Rand. But the study estimated that only a fraction of them — between 29 and 129 active service members — would seek gender-transition-related treatment each year that could temporarily disrupt their deployments.

An Obama-era policy that directed the military to pay for treatment and any necessary gender identity-related surgeries for transgender service members is also under threat. Earlier this month, House Republicans revived an effort to prevent the Pentagon from funding those procedures.

Estimates suggest, however, that treatment would account for a minor portion of the Defense Department’s overall budget: between $2.4 and $8.4 million out of the overall 2017 budget of $583 billion.

Trump’s decision isn’t the first from his administration that harms trans people’s rights. In February, the Department of Education rescinded Obama-era guidance that would have protected transgender students from discrimination under Title IX.