What about other kinds of armed conflict, like civil wars and conflicts that miss the 1,000-death cutoff? Remarkably, they too have been in decline. Civil wars are fewer, smaller and more localized. Terrible flare-ups occur, and for those caught in the middle the results are devastating — but far fewer people are caught in the middle. The biggest continuing war, in Afghanistan, last year killed about 500 Americans, 100 other coalition troops and 5,000 Afghans including civilians. That toll, while deplorable, is a fraction of those in past wars like Vietnam, which killed 5,000 Americans and nearly 150,000 Vietnamese per year. Over all, the annual rate of battle deaths worldwide has fallen from almost 300 per 100,000 of world population during World War II, to almost 30 during Korea, to the low teens during Vietnam, to single digits in the late 1970s and 1980s, to fewer than 1 in the 21st century.

As the political scientist John Mueller has pointed out, today’s civil wars are closer to organized crime than traditional war. Armed militias — really gangs of thugs — monopolize resources like cocaine in Colombia or coltan in Congo, or terrorize the locals into paying tribute to religious fanatics, as in Somalia, Nigeria and the Philippines.

Nor has the suffering merely been displaced from soldiers to civilians. The much-quoted statistic that war deaths a century ago were 90 percent military and 10 percent civilian, while today the ratio is reversed, resulted from an error in a 1994 United Nations report that mistakenly compared deaths in World War I with refugees and wounded in the 1980s. The real ratio is around 50-50 and stable through time. Yes, atrocities against civilians continue, but consider a historical perspective. During World War II, Allied forces repeatedly and deliberately firebombed Axis cities, incinerating tens of thousands of civilians in a night. The Germans and Japanese did far worse. Today’s rapes, ethnic cleansings and suicide bombings are just as atrocious, but much smaller in scale.

Why is war in decline? For one thing, it no longer pays. For centuries, wars reallocated huge territories, as empires were agglomerated or dismantled and states wiped off the map. But since shortly after World War II, virtually no borders have changed by force, and no member of the United Nations has disappeared through conquest. The Korean War caused a million battle deaths, but the border ended up where it started. The Iran-Iraq War killed 650,000 with the same result. Iraq’s annexation of Kuwait in 1990 backfired. Israel seized land in 1967, but since then most has been returned and the rest remains contested.

The futility of conquest is part of the emergence of an international community regulated by norms and taboos and wielding more effective tools for managing conflicts. Among those tools, the United Nations’ 100,000 deployed peacekeepers have measurably improved the success of peace agreements in civil wars.

War also declines as prosperity and trade rise. Historically, wealth came from land and conquest was profitable. Today, wealth comes from trade, and war only hurts. When leaders’ power depends on delivering economic growth, and when a country’s government becomes richer and stronger than its warlords, war loses its appeal.

Perhaps the deepest cause of the waning of war is a growing repugnance toward institutionalized violence. Brutal customs that were commonplace for millennia have been largely abolished: cannibalism, human sacrifice, heretic-burning, chattel slavery, punitive mutilation, sadistic executions. Could war really be going the way of slave auctions? Nothing in our nature rules it out. True, we still harbor demons like greed, dominance, revenge and self-deception. But we also have faculties that inhibit them, like self-control, empathy, reason and a sense of fairness. We will always have the capacity to kill one another in large numbers, but with effort we can safeguard the norms and institutions that have made war increasingly repugnant.