On Aug. 25, President Trump signed a memo banning transgender people from enlisting in the military. He justified his decision by citing concerns about military effectiveness, the disruption of unit cohesion and the cost of medical treatment. Yes, it is step backward in terms of civil rights, as LGBTQ activists have pointed out. But both transgender veterans and military leaders have challenged Trump’s rationale for different reasons: It obscures the reality of military service.

Trump’s policy reveals a troubling disconnect between the commander in chief and the experiences of the troops who serve under him. In combat, troops’ lives depend on the actions of their comrades. Whether that person is black, female, gay or transgender does not matter so long as he or she is a good soldier.

Since World War II, the military has succeeded in part because of its ability to prioritize merit over social assumptions about racial inferiority or sexual deviance. And these changing outlooks came not from military or political leaders — they came from the battlefield experiences of enlisted personnel. By arguing that military success depends on performance rather than racial or sexual identity, ordinary soldiers have tipped the balance in favor of integration and equality.

African Americans have a long tradition of seeking to prove their equality and merit on the battlefield, serving in every war since the American Revolution. When the United States entered World War I, most African Americans enthusiastically supported President Woodrow Wilson’s effort to “make the world safe for democracy.” However, military leaders, conforming to social ideas about racial inferiority, limited their efforts to serve. In World War I, black troops made up only 3 percent of American combat forces.

Out of military necessity, World War II recast who was fit to serve, albeit unequally. Because the United States fought the war on two fronts, the number of people mobilized dwarfed earlier wars. Sixteen million Americans served in the armed forces, including one-sixth of the male population. The scope of the war was so big that the military recruited 350,000 women, as well.

Since African Americans formed 10 percent of the population, the United States could not mobilize without them, and 1 million black men and women served in the military during World War II. Military leaders, however, sought to preserve race and gender relations through segregation. And even though the all-black 92nd and 93rd Infantry Divisions, along with the Tuskegee Airmen, fought the enemy in battle, only 20 percent of black troops were in combat units, and military leaders were reluctant to send them to the front. Combat was still primarily reserved for white men, at least until the Battle of the Bulge.

After suffering 125,000 casualties in the first month of European combat in 1944, Lt. Gen. John C.H. Lee, commander of the Communications Zone of the European Theater, persuaded Gen. Dwight D. Eisenhower to let black service troops volunteer as infantry replacements. Forty-five hundred black soldiers stepped forward. The Army sent 2,500 of these volunteers to combat training and then assigned them to various white units invading Germany in 1945.

Initially, American military leaders had justified segregation because they said adding black soldiers to white units would hurt morale. But the realities of the battlefield challenged and then changed this assumption. Army Research Bureau surveys revealed that the experience of fighting alongside black troops in Germany changed the attitudes of white troops. Before the experiment with integration, only 33 percent of the white soldiers had a positive opinion about having black soldiers in their companies. After the experiment, 77 percent of the white soldiers said their opinion of serving with African Americans had become more favorable.

What had changed? Enlisted men saw how well black troops performed in combat.

This record of the attitudes of ordinary soldiers toward integration had a direct effect on desegregating the military. In 1947, the President’s Committee on Civil Rights issued a landmark report, “To Secure These Rights,” which called for desegregating all federal agencies and facilities. It publicized the survey results, which had been suppressed by Army Chief of Staff Gen. George Marshall, to justify calling for the end of segregation in the military. President Harry S. Truman responded to the report by announcing that he intended to issue an executive order desegregating the U.S. military in 1948.

Since Sept. 11, 2001, the U.S. military has been engaged in combat with a volunteer force, and its diversity has continued to be its strength. In fact, the need to recruit soldiers in wartime for often highly technical duties has further motivated military leaders to adopt the soldier’s focus on performance and expand who can serve. In 2010, the Defense Department released its own study of how repealing the ban on openly gay men and women might affect the military, with the conclusion that “the risk of repeal of Don’t Ask, Don’t Tell to overall military effectiveness is low.”

Again, surveys of enlisted men and women provided the key evidence. When troops with combat experience were asked about the effect that repealing the gay ban would have in “intense combat situations” or “when a crisis or negative event happens that affects your unit,” about 70 percent said it would have a positive, a mixed or no effect on their unit’s effectiveness. As had been the case with enlisted white men supporting racial integration, a positive assessment of combat performance generated support in the ranks for allowing gay men and lesbians to serve openly in the military.

For over 70 years, troops have repeatedly argued that merit, not identity, matters most on the battlefield. Recent interviews with transgender veterans who served honorably show that they are capable of performing their duties well. In addition, there is evidence that allowing transgender soldiers to serve openly would improve the overall effectiveness of military units. In a Rand Corp. study examining transgender people in foreign militaries, Canadian commanders said increased diversity gave “units the tools to address a wider variety of situations and challenges.”

Inclusiveness, therefore, makes a better fighting force. That is a soldier’s perspective. The commander in chief should listen to it.