What makes an army successful in battle? A few factors come to mind: strength in numbers, tactical acumen, the type of political institutions at home. New technologies, including artificial intelligence, drones, and hypersonic weapons, might also tip the balance. But one of the most important determinants of battlefield performance is consistently overlooked: equality among soldiers, regardless of their ethnicity.

How societies treat their constituent ethnic groups can make the difference between stunning success and crushing defeat once the shooting starts. As I argue in my new book, the last two centuries of warfare show that inclusive armies—meaning that all ethnic groups represented in the military are considered full citizens of the state they are serving—enjoy far greater success than non-inclusive ones. When armies are drawn from marginalized or repressed ethnic groups, by contrast, performance suffers. These divided armies typically spend as much time coercing their own soldiers to fight as they do actually waging war against the enemy.

Ethnically divided militaries end up trapped in straitjackets of their own design. They also offer a warning: military power flows not from soldiers’ weapons but from the relative status of those who wield them. With populism and xenophobia on the march globally, militaries that succumb to these currents will find themselves vulnerable to armies—and societies—that preserve hard-won inclusion.

PATCHWORK ARMIES

We tend to write about armies as anonymous machines, faceless and uniform, but the reality is much more complicated. Diversity, particularly in terms of ethnic makeup, has characterized military organizations for centuries. Since 1800, the typical army has counted soldiers from five different ethnic groups in its ranks. Napoleon’s Grande Armée contained more Poles, Germans, Italians, and Dutch than French soldiers during its fateful 1812 march to Moscow. The nineteenth-century armies of Qing China integrated Han, Mongol, and Manchu populations and relied on numerous local auxiliaries. France, Italy, and the United Kingdom all built colonial armies in which their own soldiers were minorities. During World War II, Nazi Germany deployed more than two million non-Germans from at least 20 different ethnicities on the eastern front. The “Russian” Red Army was no less diverse. Its 45th Rifle Division had soldiers from 28 ethnic groups when it decamped at Stalingrad in 1942.

How such armies perform on the battlefield depends on whether they can manage the diversity in their ranks. And since armies reflect the states that send them, the answer comes down to how the states in question treat their constituent ethnic groups. Some construct inclusive national identities that afford equal political status to all. Others, however, exploit ethnic divisions and discrimination as tools of rule. In more extreme cases, states impose a strict hierarchy of citizenship and belonging, with “alien” populations violently relegated to the bottom.

When states go to war, these arrangements carry over into their militaries, where ethnic inequalities are extremely corrosive. Soldiers drawn from marginalized or repressed ethnic groups will be reluctant to fight and die for a regime that subjugates them. They are also more likely to bond along ethnic lines to collectively resist or subvert their superiors. Military commanders, sensing these dangers, often take steps to prevent indiscipline—they may rig the ethnic composition of their units to prevent soldiers in the same ethnic group from banding together, or they may simplify their tactics to foreclose opportunities for these soldiers to defect or desert to the enemy. Some even resort to mass violence against their own soldiers to compel what they cannot command.

Yet such measures exact a steep toll on battlefield performance. Saddled with disgruntled soldiers, left with a reduced menu of tactics, and forced to divert resources to sanctioning their own soldiers, divided armies enter battle at a significant disadvantage to their more egalitarian foes. Put simply, diversity without equality is dangerous.

THE COST OF INEQUALITY

To measure just how costly military inequality is, I built a data set, Project Mars, that maps ethnic division in the ranks of nearly 300 armies in 250 conventional wars since 1800. I then evaluated how well these militaries performed in battle, tracking how many casualties they suffered and inflicted, whether they were prone to mass defection or desertion, and whether they deployed specialized units known as “blocking detachments” to shoot their own retreating soldiers.

The results paint a clear picture. States that treat all soldiers the same way regardless of ethnicity typically field powerful militaries; belligerents with ethnically divided armies are much less effective. Unequal militaries have a 75 percent chance of suffering more casualties than those inflicted on the enemy, compared with a 25 percent chance for more egalitarian belligerents. Mass desertion, a fairly rare occurrence in diverse but egalitarian militaries, is a near inevitability in highly unequal militaries. Mass defection, too, is more common when militaries don’t treat all their soldiers equally. And as inequality among soldiers rises, armies become far more likely to field deadly blocking detachments.

History is littered with cautionary tales of fighting while divided. Consider, for example, the crushing defeat of a 60,000-strong Mahdist army by a much smaller Anglo-Egyptian force at Omdurman, in what today is Sudan, in 1898. That lopsided victory is typically ascribed to the superiority of Western military technology at the time, above all an early type of machine gun that decimated the Mahdist forces. But that account misses another critical factor: the sky-high inequality in the ranks of the Mahdist military. The leader of the Mahdist state, the khalifa, ruled atop a narrow ethnocracy and had unleashed repeated waves of violence against his own people is military was largely composed of repressed ethnic groups and tribes, half of which deserted or defected well before Omdurman. Special units of regime loyalists forced the reluctant soldiers that remained into battle. Small wonder, then, that they fared so poorly.

Inequality affects even individual units. During the brutal Battle for Moscow in October 1941, German troops encircled the 38th and 108th Soviet Rifle Divisions. The two divisions, trapped side by side, were roughly the same size and had comparable weapons. But only the 108th managed to fight its way out, losing nearly three-quarters of its soldiers in the process. The 38th was overrun and destroyed so completely that it was struck from the official Soviet roster of units. The main difference between the two? The more successful 108th was mixed but mostly Russian in its ethnic composition, whereas the 38th was drawn almost exclusively from repressed national groups in the North Caucasus.

A PERSISTENT THREAT

What may seem like an artifact of a bygone era of mass industrial warfare in fact determines battlefield success to this day. Consider the wars raging across the Middle East and South Asia. The spectacular failure of Sunni-dominated Iraqi Army units to fend off the advancing troops of the Islamic State, or ISIS, in 2014 and 2015 can be traced to soldiers’ grievances over the marginalization of the Sunni populace under then Prime Minister Nouri al-Maliki. Likewise, the Syrian Army, led principally by Alawite officers, has been gutted by tens of thousands of desertions and defections among the majority-Sunni rank and file, who resent their second-class status in President Bashar al-Assad’s narrow ethnosectarian vision of Syria. And the Afghan National Army continues to suffer rampant desertion owing to interethnic abuses in its ranks and suspicion among non-Pashtun soldiers of the pro-Pashtun-leaning government in Kabul.

These pitfalls will remain as long as ethnicity is a salient cleavage easily exploited for political gain. Even Western democracies, including the United States, are not immune: the tribalism, populism, and white nationalism taking hold in these societies may at some point relegate certain identity groups to second-class status, including in the military. Elsewhere, that outcome is much closer: China’s repression of ethnic minorities in Xinjiang and Tibet and India’s new anti-Muslim citizenship bill are both examples of ambitious but risky efforts to recast citizenship along rigid ethnic lines. If these governments persist, their efforts will sooner or later affect their militaries, too.

Ethnic politics will also shape the use of next-generation technologies in future conflicts. Adversaries will be able to microtarget disgruntled soldiers with social media, encouraging and facilitating their defections. Rigid command-and-control structures, designed to prevent indiscipline by marginalized or repressed soldiers, will be a particular disadvantage against fast-moving, artificial intelligence–driven enemies. But AI might also allow the commanders of divided armies to better monitor potentially disloyal soldiers. To prevent desertion or defection, leaders might track their troops with biometric devices and restrict them to certain geographic areas, policed by drones or other automated systems. Such technologies would not only create a credible threat of punishment, forcing soldiers to fight harder to avoid sanction; they might also embolden leaders to risk new wars.

Factoring in the effects of ethnic inequality could give states a leg up in future conflicts, affording predictive insights into an adversary’s potential military performance. Unlike other factors, inequality is relatively easy to assess from the outside, largely through open sources such as social media, which can provide clues almost in real time. With sufficient information, military planners could supplement their traditional data—on the enemy’s equipment and organizational structure—with ethnic inequality scores for individual units. They could then pinpoint units prone to break under pressure or those that will stand and fight, helping to shape campaign plans before a war begins. Commanders could use similar analyses to evaluate the resilience and combat power of local proxy forces, newly rebuilt militaries in allied states, and even insurgent organizations such as the Taliban or ISIS.

The lesson for modern militaries is clear: every military is a risky experiment in social engineering, and centuries of warfare point to the power of inclusion for turning that experiment into a success. Equality creates lethal armies; inequality weakens them from within. Bigotry and racism are self-inflicted wounds that undermine national security. At a time of rising uncertainty in world politics, U.S. policymakers would do well to deepen their commitment to a diverse and equal military. Inclusion is not only a good in itself but a means of bolstering the nation’s military power in still-unimagined wars.