IN A series of tweets Wednesday morning, President Trump turned his back on the thousands of transgender people currently serving in the military — and he did so with his characteristic dishonesty. He claimed that he had consulted “with my Generals and military experts” before deciding that transgender individuals would not be allowed “to serve in any capacity in the U.S. Military” — a reversal of the policy adopted by the Obama administration. In fact, Mr. Trump appears to have made his decision hastily, interrupting an ongoing Pentagon review and taking key military and congressional players by surprise. He asserted that allowing transgender personnel to serve would result in “tremendous medical costs and disruption” — though careful studies and the experience of other nations have shown just the opposite.

What the president no doubt did not consider is this: How will his decision affect the thousands of patriotic Americans now serving, including in war zones, who happen to be transgender? In addition to depriving them of the respect they deserve from their government, Mr. Trump puts them at risk: To continue serving, transgender personnel will have to conceal their identities, which in turn will make them less likely to come forward with health concerns or reports of sexual assault. Mr. Trump is essentially reinstating a shameful policy of silence and discrimination.

The decision disregarded the results of a year-long review conducted by the Obama administration that found the costs associated with accepting transgender troops would be minor. The Rand Corp. estimated that allowing these troops to serve openly would have a “minimal impact” on troop readiness and would mean between $2.4 million and $8.4 million in additional health-care costs per year — a little more than a rounding error in the military budget. A study in the New England Journal of Medicine reached similar conclusions. Around the world, 18 countries allow transgender troops to serve openly and none have reported experiencing ill effects or “disruption.”

The directive will surely weaken the armed forces, depriving them of thousands of service members and potential recruits. Yet Mr. Trump seems to have made his decision without significant input from the Defense Department. Several Pentagon officials told the New York Times they were caught off guard by the announcement, while spokeswomen for both the Senate and House Armed Services committees said the committees had not been informed in advance. A review of the policy ordered by Defense Secretary Jim Mattis was not due to be completed until December.

According to a report by Politico, the president’s precipitous action actually came in response to appeals from House Republicans, who feared a defense appropriations bill containing funds for Mr. Trump’s border wall would be blocked by their own disagreements over the issue. That thousands of serving military personnel would be abruptly stripped of their rights for such crass political reasons would be shocking — if Mr. Trump had not already drastically devalued the norms for presidential behavior.

During his campaign, Mr. Trump promised to “do everything” to protect members of the lesbian, gay, bisexual and transgender community. But his administration’s small-minded and ignorant policies toward transgender people — first students, and now service members — are doing just the opposite.