WASHINGTON ― President Donald Trump tweeted Wednesday that transgender people will no longer be allowed to serve in the U.S. military “in any capacity” ― a stunning reversal of an Obama-era policy that affects thousands of service members.

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

The move, which ironically comes in the middle of the White House’s American Heroes Week, was wholly unexpected. It’s not clear why Trump decided to announce such a significant policy change via Twitter or when it would take effect. His timing in relation to other political events is also odd: He shared the news in the midst of Senate Republicans’ high-stakes fight to repeal Obamacare this week.

Trump claims he made the move after consulting with military experts, despite the Pentagon lifting the ban on transgender service members in 2016 after an exhaustive review of its military readiness policies.

“Our mission is to defend this country, and we don’t want barriers unrelated to a person’s qualification to serve preventing us from recruiting or retaining the soldier, sailor, airman or Marine who can best accomplish the mission,” then-Defense Secretary Ashton Carter said. “We have to have access to 100% of America’s population for our all-volunteer force to be able to recruit from among them the most highly qualified — and to retain them.”

The biggest question is what the news means for the thousands of transgender men and women currently serving in the military. There are between 1,320 and 6,630 transgender people in active military service, a Rand Corp. study estimates. Another group, the Palm Center, put the number as high as 15,500 a few years ago.

White House spokeswoman Sarah Sanders couldn’t give any details later Wednesday when she was asked what will happen to the transgender troops currently serving overseas or when the ban will take effect. During her daily press briefing, she repeatedly said the White House and the Defense Department will work out those specifics.

Asked about Trump’s pledge as a candidate to fight for the LGBTQ community, Sanders said his decision to ban transgender troops was about “military readiness” and that the president “has been very clear he’s committed to fighting for all Americans.” As more questions poured in, Sanders said she would end the briefing if reporters didn’t ask about other topics.

“If those are the only questions we have, we’re going to call it a day,” she said.

The Pentagon has been referring all questions about the change to the White House.

NEW: Pentagon statement on Pres Trump's transgender servicemember tweets -refers all Qs to the White House

(h/t @ABC's @Elizabeth_McLau) pic.twitter.com/avibiD4Te3 — Karen Travers (@karentravers) July 26, 2017

One thing that is clear is that conservatives have been gunning for this change. The right-wing Family Research Council was among the first out with a statement praising Trump for taking the step.

“I applaud President Trump for keeping his promise to return to military priorities ― and not continue the social experimentation of the Obama era that has crippled our nation’s military,” said the group’s president, Tony Perkins. “The military can now focus its efforts on preparing to fight and win wars rather than being used to advance the Obama social agenda.”

Rep. Vicky Hartzler (R-Mo.), who unsuccessfully tried to deny hormone therapy and gender transition-related care to transgender troops during debate on a defense spending bill this month, also hailed Trump for being concerned about the cost of providing care to transgender service members.

Pleased to hear that @realDonaldTrump shares my readiness and cost concerns, & will be changing this costly and damaging policy #readiness — Rep. Vicky Hartzler (@RepHartzler) July 26, 2017

But those costs are incredibly low: Rand Corp. estimates 30 to 140 people would seek new hormone treatments per year, and 25 to 130 would seek gender transition-related surgeries. That amounts to a 0.04 to 0.13 percent increase in the Defense Department’s total health care spending, per Rand.

The American Medical Association has emphasized the medical necessity of mental health care, hormone therapy and gender-transition surgery as forms of therapeutic treatment for people diagnosed with gender dysphoria, a “serious medical condition” that stems from the distress a person feels when his or her gender identity does not correspond with his or her birth sex. Not all transgender people are diagnosed with gender dysphoria; some don’t experience that distress.

LGBTQ rights groups slammed Trump for making the change solely to appease his conservative base.

“This has been studied extensively, and the consensus is clear: There are no cost or military readiness drawbacks associated with allowing trans people to fight for their country,” said Joshua Block, senior staff attorney with the American Civil Liberties Union’s LGBT & HIV Project. “The president is trying to score cheap political points on the backs of military personnel who have put their lives on the line for their country.”

Gregory Angelo, the president of Log Cabin Republicans, a group that represents LGBTQ conservatives, said Trump’s move “smacks of politics, pure and simple.”

“The United States military already includes transgender individuals who protect our freedom day in and day out,” Angelo said. “Excommunicating transgender soldiers only weakens our readiness; it doesn’t strengthen it.”

The president’s action completely contradicts his 2016 campaign claims about being better for lesbian, gay, bisexual and transgender Americans than his Democratic opponent, former Secretary of State Hillary Clinton.

Trump dodged the draft a total of five times, once arguing he couldn’t serve in the U.S. military because of bone spurs in his heels.

This article has been updated with comments from Sarah Sanders’ press briefing and more reactions to the announcement.