It has been a rough summer. Tragic interracial shootings by and of police. A presidential candidate promoting screening out Muslims and walling out Mexicans. A retreat by the British from the European Union after 43 years. The repeated murder of dozens by fanatics with some delusion that it will promote their cause.

People are angry, worried and confused, and on these pages I have seen nostalgia for small communities, tribalism and isolationism. But let's keep in mind how far we have come on our ascending path of cultural evolution.

To begin with, we must appreciate how prone our species is to conflict and violence. As a judge, I have seen cases of murder for failing to pay for $60 worth of marijuana or refusing to turn down loud music; gut-wrenching abuse of family members; nearly murderous road rage, and neighbors and business partners who fought bitterly for years over trivialities.

This is nothing new. For 90 percent of the 60,000-year history of behaviorally modern humans, we lived in small groups. And the evidence is that the vast majority of those groups engaged in constant raiding, feuding and revenge killing. We are not alone in this — we share 99 percent of our genes with chimpanzees, who will generally ambush, kill, and mutilate any individual or small group who strays into their territory.

As the groups get larger, they get worse. In "Moral Man and Immoral Society," the theologian Reinhold Niebuhr explained that societies will always act more rapaciously and ruthlessly than their members because they lack the humanizing impulses that soften our conduct toward individuals. Researchers have since confirmed that groups gravitate to more extreme views than individual members would. Think about "ethnic cleansing" or genocide committed by people against victims who were once their neighbors.

So we start with a serious problem, but two solutions have served us well.

The deepest peacemaking force is, of course, kinship — we naturally nurture those who share more of our genes. We take care of our families and relatives and would give up our lives for our children without a thought. Humans structured communities around kinship for all but the last sliver of our history. Scientists are now exploring the idea that the strangely rapid proliferation of dialects and language differences has served as a quick test for where someone grew up and thus whether they share our genes. Even in our modern transient society, most people choose to live near family members if they can.

So let's appreciate our brave idealism as we now attempt to forge a truly multicultural society. The different race or religion of another person is like seeing a sign saying, "Different genes." Brain imaging technology now allows scientists actually to see the emotional response we have to people of different races.

The remedy is familiarity. Studies have repeatedly found that the strongest factor in reducing a person's stress in interracial encounters is how much familiarity the person has with people from the other group. This provides great hope. I am ashamed to say that when I was growing up in Duluth in the 1950s, we repeated racially derogatory jokes and snickered behind the backs of students and teachers we thought might be gay. Just one generation later, my teenage daughter often filled our house with groups of laughing kids who paid not the slightest attention to race or sexual orientation.

This natural process is being jump-started. Citizen-to-citizen encounters being organized in the Middle East, and police-community dialogues underway in the U.S., for example, may do more than diplomacy and law.

Because of kinship, we know how to nurture. We sometimes call strangers brothers or sisters or refer to the human family.

Our second solution for managing our violent natures, for when societies grow beyond kinship groups, is the rule of law. In his comprehensive study of why we are living in the most peaceful period in human history, Harvard psychologist Steven Pinker estimates that the existence of a state that controls the use of force reduces violent death by 80 percent. We have had all too much familiarity from Afghanistan, the Middle East and Somalia with what happens when law and order break down.

The rule of despots becomes the rule of law when the dictates of the strongest evolve into the promulgation of fair, nondiscriminatory rules applicable to all.

In other words, the police should be the best insurance of the safety of minorities, not their enemies.

We are now at the stage of extending the rule of law across borders. Western Europe has been at peace since 1945, after averaging two new armed conflicts a year since 1400. And the proliferation of multinational treaties, conventions and organizations worldwide promises increasing stability.

In addition to controlling conflict, international arrangements and institutions are needed to address other cross-borders problems such as climate change, water scarcity, immigration, refugees and terrorism. In his groundbreaking treatise "Capital in the Twenty-First Century," Thomas Piketty has added another compelling consideration — the rapidly accelerating concentration of capital that knows no borders. Some individuals are already as wealthy as entire countries. Global — or at least regional — controls and taxes are going to be required to stem this inexorable concentration.

In other words, far from globalization promoting the interests of the elite, it should be the best means of protecting us from the coming megarich.

But now we are confronting the fundamental problem of political organization explained by Niebuhr — that unity requires at least some element of coercion, and the tools of coercion are subject to being hijacked by the powerful and organized interests and classes. Witness the Communist Party in the Soviet Union and the religious extremists in ISIL.

Even back in 1932, Niebuhr warned of powerful economic interests capturing the tools of power in the U.S. It is obvious what he would think about money in politics now.

Our task, then, is to avoid throwing out the baby of international arrangements with the bathwater of particular institutions that are not responsive to the common good.

There is no going back to tribalism. There are now 19 metropolitan areas in the world with populations above 15 million, with tens of millions of people pouring into cities every year. We need to keep getting better at multiculturalism.

The headlines may be distressing, but we know what to do. Seek out opportunities to get to know different kinds of people. Promote international arrangements that maintain the same transparency and democratic processes we expect for domestic ones. Aspire to make the whole world our tribe.

Bruce Peterson is a Hennepin County district judge.