Updated July 26 at 3:31 pm EST

President Trump has announced that transgender Americans will not be allowed to serve “in any capacity” in the U.S. military, a move that could affect thousands of people serving in the armed forces and which resulted in almost immediate pushback from influential Republicans.

Trump tweeted Wednesday that the U.S. 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.”

Former Secretary of Defense Ashton Carter announced last June that transgender individuals would be able to serve openly in the military. He issued guidance for medical care for these soldiers—including those who transitioned during their service—as well as training military leaders. Since then, it has been the military’s policy not to discharge or deny reenlistment to service members based solely on their gender identity. The full policy was set to be implemented by July 1, 2017. But at the end of June, Secretary of Defense Jim Mattis announced a six-month delay to review the plan, assessing whether it would hurt the “readiness or lethality” of American troops.

Trump’s announcement is the latest in a set of steps his administration has taken to walk back Obama-era policies on transgender Americans. The biggest shift is the reasoning: Rather than framing his decision in the language of rights or morality, as Obama-era officials did, Trump spoke about the new transgender policy in terms of military efficiency. The decision is likely to trigger major blowback from Democratic legislators and LGBT activists who long pushed for full acceptance of transgender service members. It will also bring gender identity back into the spotlight, reigniting a culture-war debate surrounding a president who has tried to sell himself as a friend of LGBT rights.  

Rand, a research think tank, estimated there are between 1,320 and 6,630 transgender Americans serving in the military out of 1.3 million active-service members. The Williams Institute, a think tank housed at UCLA’s law school, puts the total number of active-duty and guard or reserve service members higher, estimating that 15,500 transgender people are part of those military forces. The institute’s researchers also calculated that 134,300 veterans identify as transgender.

Although it’s impossible to know how many members would need gender-transition-related services, it’s likely that only a fraction would want to transition while in service—Rand suggested that somewhere between 29 and 129 people per year would make those requests. The “upper bound” of estimated requests was “0.1 percent of the total force,” Rand wrote. The expected costs related to these services were between $2.4 million and $8.4 million each year.

When Mattis announced the delay in implementing the Obama-era guidelines, he questioned how the policy would affect service members’ ability to perform their duties. “Since becoming the Secretary of Defense, I have emphasized that the Department of Defense must measure each policy decision against one critical standard: Will the decision affect the readiness and lethality of the force?” Mattis said, according to The Washington Post. “Put another way, how will the decision affect the ability of America’s military to defend the nation?”

While there has not been much research done on this question, according to Rand, policies welcoming lesbian, gay, and bisexual Americans to serve openly in the military did not diminish units’ effectiveness. The Rand researchers expected “little or no impact on unit cohesion, operational effectiveness, or readiness” resulting from Obama’s policy.

Former Secretary Carter issued a statement criticizing Trump’s decision on Wednesday morning. “I continue to maintain that what matters in choosing those who serve is that they are best qualified. To choose service members on other grounds that military qualifications is social policy and has no place in our military,” he said. “There are already transgender individuals who are serving capably and honorably. This action would also send the wrong signal to a younger generation thinking about military service.”

Legislators have also been working on potential ways to reverse or gut funding for the Obama administration’s policy. Foreign Policy reported on Tuesday that Vice President Mike Pence had been working with Republican Congressmen on amendments to the 2018 defense-spending bill that would have prohibited money from being used for medical services related to gender transition.This was a policy that many Republicans hated: During Congressional debates over the issue this month, California Representative Duncan Hunter, a veteran of the wars in Iraq and Afghanistan, said of transgender people, “You’re joining the U.S. military. Choose what gender you are before you join.”

A small group of conservative legislators supported Obama’s policy, however. Some Republicans appeared to tentatively push back on Trump’s reversal on Wednesday:

John McCain joined in with more explicit criticism. “The president’s tweet this morning … is yet another example of why major policy announcements should not be made via Twitter. The statement was unclear,” the Arizona senator said in a statement. “There is no reason to force service members who are able to fight, train, and deploy to leave the military—regardless of their gender identity.” NBC reported that the Senate Armed Services Committee, headed by McCain, was not briefed in advance of the White House’s announcement.

Other Republicans legislators added statements of their own, including Ileana Ros-Lehtinen, the Florida Republican who has a transgender son. A spokesman for Joni Ernst, the conservative Iowa senator and military veteran, said she disagrees with publicly funding transition services, but “Americans who are qualified and can meet the standards to serve in the military should be afforded that opportunity.”

There’s some evidence the Trump administration’s motivation was not just about military efficiency—it’s also political. Jonathan Swan of Axios quoted an unnamed senior Trump administration official talking about the political consequences for Democrats who push back against the decision in 2018.

“This was a military decision,” said Sarah Huckabee Sanders, the White House press secretary, in a press conference on Wednesday. “This was about military readiness. This was about unit cohesion. This was about resources within the military, and nothing more.”

On Wednesday, Politico reported a different possibility for the rationale and timing of the decision: It was Trump’s attempt to defuse a building Congressional battle over military funding for transition surgeries, which had threatened to undermine promised funding for a Mexican border wall.  

A number of LGBT-rights groups criticized Trump’s decision. “The thousands of transgender service members serving on the front lines for this country deserve better than a commander-in-chief who rejects their basic humanity,” said Joshua Block, an attorney with the American Civil Liberties Union, in a statement. “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.”

In the past, Trump has spoken supportively of LGBT rights. On the campaign trail, for example, he surprised some conservative backers with his cavalier attitude toward the now-infamous bathroom-bill controversy in North Carolina. At an event last April, he observed that the state’s legislators were “paying a big price” for their attempt to ban transgender people from using public restrooms that match their gender identity. He said that if Caitlyn Jenner came to Trump Tower, she could use any bathroom she wanted.

His administration’s policies, however, have signaled a different stance on transgender rights. Earlier this year, the Trump administration announced another transgender-related policy reversal. Under Obama, the Departments of Justice and Education had issued guidance to public schools requiring them to fully accommodate transgender students, including allowing them to use bathroom and locker-room facilities that matched their gender identity. Attorney General Jeff Sessions and Education Secretary Betsy DeVos joined together to roll back that policy, citing a desire to “further and more completely consider the legal issues involved.”

Trump’s decision to ban transgender people from serving in the military is part of an on-going effort to undo policies Obama developed late in his presidency. While the decisions have been framed as efforts to protect states’ rights and troop performance, they inevitably hold a culture-war valence. In that sense, Trump has just made his entry into a new kind of battle—one that animates his allies and enemies, but doesn’t seem to be a fight of his own.