President Donald Trump issued a ruling on Wednesday outlawing military service by people who do not conform to a binary gender system.

“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,” he wrote in a string of tweets. “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.”

Trump previously promised to be an advocate for transgender people, writing during the campaign, “Thank you to the LGBT community! I will fight for you while Hillary brings in more people that will threaten your freedoms and beliefs.”

Rather today Trump imposed a rigid standard, preventing service “in any capacity,” even roles that might avoid contentious issues like restrooms and living quarters.

His only clear justification was the inability to deal with “tremendous medical costs.”

The military has not historically covered gender-transition surgeries, though President Barack Obama did announce plans for it to begin doing so. That cost would be between $2.4 million and $8.4 million annually for transition-related costs, according to a RAND analysis commissioned by the Department of Defense. The group estimated there are between 1,320 and 6,630 active-duty transgender servicepeople currently. A study in The New England Journal of Medicine in 2015 put the number at 12,800 people and $4.2 million to $5.6 million, concluding that “doctors agree that such care is medically necessary.”

This would be a military health-care spending increase of 0.04 to 0.13 percent. Even in the most extreme case, it is one tenth of the annual $84 million that the military spends on medication for erectile dysfunction.

The relative costs drops into the ten-thousandths of a percent when taken in context of the Department of Defense budget as a whole, expected to be proposed at $640 billion. The F-35 cost $1.5 trillion. Military bands cost taxpayers $437 million.

Of course, not only is it false that the medical costs of transgender soldiers would be prohibitive, it’s wrong. The vast majority of medical costs among people of any gender in America are the same: heart disease, dementia, diabetes, and cancers. If these costs are a concern, they could be minimized in many ways, including investing in public-health programs and a system that gives people access to preventive health care.

Rather Trump and congressional Republicans are now proposing to do the opposite.

The diseases that do seem to disproportionately afflict transgender people are mental-health issues. The pathology behind this is abetted by societal marginalization of exactly the sort that Trump’s language propagated today—portraying transgender people as a burden to The Mission, with a focus on “medical costs” as an apparent euphemism for gender-reassignment surgeries.

Trump’s ruling will leave many talented Americans ineligible for service. Others will opt to serve and deny their own gender identities, an unhealthy situation that will carry its own medical costs. So it’s unlikely this is really about medical costs, as much as it is part of Trump’s quest to undo measures undertaken by Obama. Even when it means that the commander-in-chief is dividing and weakening his military and country.