President Trump on Wednesday said he would ban transgender people from any military service.

Trump made the announcement, which would represent a major shift in military policy, on Twitter. He said he had made the decision after consulting with "my generals and military experts."

"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," Trump tweeted.

ADVERTISEMENT

"Our military must be focused on decisive and overwhelming victory and cannot be burdened with the tremendous medical costs 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

Trump made the surprise announcement with Defense Secretary James Mattis on vacation, stoking speculation about the Pentagon’s level of involvement in Trump’s decision.

It wasn't immediately clear what Trump's announcement would mean for the approximately 250 transgender people now serving openly in the U.S. military.

A Pentagon spokesman referred all questions about Trump’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,” Navy Capt. Jeff Davis said. “We will provide revised guidance to the Department in the near future.”

A staffer for the House Armed Services Committee said Wednesday on background it was surprised by Trump’s announcement and is waiting for more information.

The committee declined to provide a statement from Chairman Mac Thornberry (R-Texas).

Rep. Ileana Ros-Lehtinen (R-Fla.), whose son is transgender, immediately slammed the decision.

"No American, no matter their sexual orientation or gender identity, should be prohibited from honor + privilege of serving our nation #LGBT," she tweeted.

But conservatives who have been pushing for the ban to be reinstated applauded Trump’s announcement.

“President Trump’s decision today to rescind Obama’s transgender military policy has the best interests of the military in mind, and I thank him for taking this decisive action,” Rep. Vicky Jo Hartzler (R-Mo.) sid in a statement.

Trump's decision is a gesture to the conservative base at a time when he's facing declining poll numbers and increasing pressure over the Russia investigation.

White House officials did not immediately respond to a request to explain the president's decision-making process.

During the 2016 presidential race, Trump called himself a "real friend" of the LGBT community in the wake of the Orlando nightclub shooting and accused Democratic nominee Hillary Clinton Hillary Diane Rodham ClintonJoe Biden looks to expand election battleground into Trump country Biden leads Trump by 12 points among Catholic voters: poll The Hill's Campaign Report: Biden goes on offense MORE of prioritizing "immigration policies that bring Islamic extremists" into the U.S.

“Thank you to the LGBT community! I will fight for you while Hillary brings in more people that will threaten your freedoms and beliefs,” he tweeted in June. Thank you to the LGBT community! I will fight for you while Hillary brings in more people that will threaten your freedoms and beliefs. — Donald J. Trump (@realDonaldTrump) June 14, 2016 He also criticized North Carolina's controversial "bathroom law," saying in an April 2016 interview that the state was "paying a big price" for the policy and that transgender individuals should use whatever bathroom they want. But Trump also blasted “political correctness” when asked during an October town hall about “social engineering” in the military. The questioner, a veteran, included open service by transgender troops among his concerns. "We're going to get away from political correctness," Trump told the questioner. "Some of things that they're asking you to do and be politically correct about are ridiculous." The Obama administration lifted the ban on allowing transgender troops to serve openly last year.

Under the policy set by then-Defense Secretary Ash Carter, transgender troops also receive coverage for any treatment deemed medically necessary by their doctors, including surgery and hormone therapy.

That step left a decision for Mattis to make on whether to allow new transgender troops to enter the military.

Trump’s decision is a huge blow the LGBT community, which was just coming off a win after the surprising defeat of an amendment to the annual defense policy bill that would have banned Pentagon funding from being used for transition-related medical care.

But under the policy Carter crafted, transgender recruits weren’t allowed to enlist pending the end of a one-year implementation period.



That was supposed to end July 1. But the night before the change was to go into effect, Mattis issued a six-month delay in the policy to study the issue more.



In a memo explaining the delay, Mattis insisted that his decision does not “change policies and procedures currently in effect.”



Mattis also promised during his confirmation hearing that he wouldn’t reverse his predecessor’s decisions unless a service chief brings him hard evidence the policy is having a negative effect.



LGBT advocates were worried immediately after the election that Trump would roll back the transgender policy, which he has the power to do unilaterally since it is not a law.



They breathed a sigh of relief after Mattis’s confirmation hearing but have since been fighting on issues such as the enlistment policy and medical care.



Earlier this month, the House voted 209-214 against banning Pentagon funding from being used for transition-related care. Twenty-four Republicans joined with Democrats to defeat the amendment to the annual defense policy bill.



Mattis opposed the amendment, confirming he called Hartzler, its sponsor, at least once on the issue.



But some Republicans hoped to have a second chance, filing several similar amendments to the spending bill coming to the House floor Wednesday.

The Rules Committee on Tuesday night decided on some of the amendments that will get a vote on the House floor. None of the transgender-related amendments made it in, but there will be a second chance on Wednesday.

Rep. Scott Peters (D-Calif.) filed an amendment Wednesday to the appropriations bill that would ban Pentagon funding from being used to implement Trump’s directive.

“I can’t think of anything more backwards than turning away a brave, qualified American who wants to serve in our all-volunteer military because of their gender identity,” Peters said in a statement. “Just as we did with the repeal of Don’t Ask, Don’t Tell, Congress must stand up against backwards politics, trust our military leaders, and put national security first.”

--This report was last updated at 12:33 p.m.