President Donald Trump announced via Twitter that he is not allowing transgender people to serve in the U.S. military, a reversal of former President Obama’s decision last year to let them serve.

In a series of tweets, he said:

“After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow Transgender individuals to serve in any capacity in the U.S. Military. Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical cost and disruption that transgender in the military would entail. Thank you.”

After consultation with my Generals and military experts, please be advised that the United States Government will not accept or allow…… — Donald J. Trump (@realDonaldTrump) July 26, 2017

….Transgender individuals to serve in any capacity in the U.S. Military. Our military must be focused on decisive and overwhelming….. — Donald J. Trump (@realDonaldTrump) July 26, 2017

….victory and cannot be burdened with the tremendous medical costs and disruption that transgender in the military would entail. Thank you — Donald J. Trump (@realDonaldTrump) July 26, 2017

Last year, former Defense Secretary Ash Carter issued an order that allowed transgender troops to serve openly and undergo gender reassignment surgery and formally change their gender in Pentagon systems.

But he gave the military services until July 1 to develop policies to allow individuals who already identify as transgender to join the military.

Defense Secretary Jim Mattis in June decided to delay that decision, giving the military service chiefs another six months to review whether allowing transgender people to enlist would affect the “readiness and lethality” of the force.

“After consulting with the service chiefs and secretaries, I have determined that it is necessary to defer the start of accessions for six months,” he said in a memo obtained by The Associated Press. “We will use this additional time to evaluate more carefully the impact of such accessions on readiness and lethality.”

Trump’s decision also comes after Mattis issued a series of other memos directing that decisions be based on whether it makes the military more lethal and is a good use of Pentagon funds.

One memo put an end to all training that was not related to military readiness. Another recent memo blasted Pentagon officials for wasting as much as $28 million on Afghan camouflage uniforms that don’t actually blend in with Afghan terrain.

“On my first day as Secretary of Defense, I wrote, ‘Every action we take will be designed to ensure our military is ready to fight today and in the future.’ It is imperative we align our actions to our larger mission and that we disaggregate priorities that increase the lethality of our forces from functions that are wasteful and unnecessary,” Mattis wrote in a July 21 memo obtained by Breitbart News.

“Only by instilling budget discipline, by establishing a culture of cost awareness, and by holding ourselves accountable, can we earn the trust and confidence of the Congress and the American people that we are the best possible stewards of taxpayer dollars,” he wrote.

There are about 250 troops who are undergoing gender reassignment, or have been approved to formally change their genders within the Pentagon’s personnel system, according to the Military Times.