In an unexpected move Wednesday morning, on the 69th anniversary of President Harry Truman’s order to desegregate the armed forces, President Donald Trump tweeted that he had decided to bar transgender Americans from serving in uniform.

Trump’s latest edict surprised the national security establishment, short-circuiting a review of the current transgender policy recently ordered by Defense Secretary James Mattis and coming before the Pentagon’s personnel officials even had confirmation hearings, let alone started their jobs. The way the announcement was made begged the question of whether Trump discussed this issue with the military’s leadership at all. Worse though, on its merits, the order contradicts decades of military leadership on equal opportunity and flies in the face of empirical research showing transgender troops don’t hurt readiness. Quite the contrary: Wednesday’s move will only make it harder to maintain readiness, by slightly shrinking the pool of eligible recruits, removing current service members, and signaling to many others that today’s military is not the kind of employer they want to work for.

The tweetstorm that barred transgender troops stands in stark contrast to the military’s proud civil rights legacy. American military history since the Civil War tells a story of one group after another gaining entrance to the service—and then more prestigious roles within the service, such as assignment to combat units or the opening of the officer corps. Uniformed service represented more than a job or chance to fight for these groups; it meant an opportunity to earn legitimacy as full-fledged citizens, and with it, the ability to vote, work, and raise families alongside the rest of America.

Unfortunately, the abhorrent tweets by President Trump on Wednesday morning play into false narratives that have long been used to avoid or delay change in the armed forces. From integration of black Americans, to women gaining the right to fly planes and participate in front-line combat, to the repeal of “don’t ask, don’t tell”—false arguments and stereotypes have always been deployed to oppose the change. In each of these cases, history has proved the naysayers wrong and shown the wisdom of broadening the aperture of service.

In this case, there is solid empirical evidence as to why the transgender ban is wrong. A recent RAND report commissioned by the Department of Defense found that readiness will remain largely unaffected by allowing transgender people to serve while health care cost increases will likely be no more than one-tenth of 1 percent. Several foreign militaries have long been fully integrated and experienced none of the problematic effects Wednesday morning’s announcement suggested.

Senior military leaders responsible for readiness have echoed these findings. Former chairman of the Joint Chiefs of Staff, Adm. Michael Mullen, recently encouraged the military to fully accept transgender troops. “Thousands of transgender Americans are currently serving in uniform and there is no reason to single out these brave men and women and deny them the medical care that they require,” Mullen told USA Today, citing the harm to discipline and integrity caused by the “don’t ask, don’t tell” law and now the transgender ban.

The cost of losing approximately 15,000 active and reserve troops who are currently serving honorably is bad enough but doesn’t begin to reflect the enormous cost the military could face in the loss of future recruits. Though transgender recruits themselves may reflect a small proportion of overall yearly accessions, there is no accounting for the number of other young Americans who will choose not to be a part of an organization that openly discriminates in this way.

The youngest cohort of Americans—those 18- to 25-year-olds the military targets for recruiting—have many options for employment in an improving economy. Most don’t seriously consider military service, mainly due to a lack of familiarity or influencers in their life who steer them otherwise. For those who are on the margins, particularly women or those who are from geographic areas where the military is less popular, Trump’s transgender ban will be another strike against service.

On issues of LGBTQ rights, millennials (who make up the military’s recruiting pool) have shown the highest levels of acceptance of any generations, with a recent Pew survey indicating 74 percent of millennials are supportive of gay marriage. A survey out of the Naval Postgraduate School found in 2013 that 83 percent of millennials believed prior to the DADT repeal that “gays and lesbians should be allowed to serve openly” with the same survey finding a majority of millennials believed repeal would increase the military’s overall effectiveness. The choice to score political points on the backs of service members does a disservice to the armed forces and will go down in history as an embarrassing and discriminatory mistake.

All of the evidence indicates that transgender service is a net positive for our armed forces, and in fact, some research shows that transgender Americans are twice as likely to volunteer to serve. To think that such an ill-informed and discriminatory stance won’t affect broader perceptions of military service is a shortsighted and costly mistake.

Clearly, there is no rational basis for Trump’s order. Reporting dribbling out of the White House indicates the ban reflects a craven political calculation by the Trump administration: a willingness to discriminate against one small group in order to curry favor with Trump’s eroding political base. “It’s not the worst thing in the world to have this fight,” one administration official told Politico. That President Trump would make a national security decision on such grounds indicates his level of unfitness for office. Deciding who serves in the military is a matter of the highest consequence. Trump’s ill-informed decision to exclude transgender troops—sacrificing both national security and our deep national commitment to equality—reveals he is incapable of making national security decisions smartly or wisely.