Hours after a sniper gunned down five law enforcement officers in Dallas—claiming, according to police, that “he wanted to kill white people, especially white officers”—no one was crowing louder than David Duke. “All I warned about, sorry to say, is now happening,” the former Klansman tweeted. “There is war against Whites in America. A war of hate, racism, and violence against us!” Duke circulated tweets by people who used the phrase “black lives matter” and celebrated the shootings. In a pitch to Donald Trump supporters, he added the hashtags #WarOnWhites, #ThanksObama, and #MakeAmericaGreatAgain.

This is the central thing to understand about what happened in Dallas: Black people who target whites are fundamentally allied with white people who target blacks. They’re on the same team: the race war team. It’s a lot like the global struggle over jihadism, in which Muslims who hate Christians collaborate, in effect, with Christians who hate Muslims. In the case of jihadism, the real struggle isn’t between two religions. It’s between people who want religious war and people who don’t. The same is true of race: Either you’re on the race war team, or you’re against it.

The attack in Dallas—allegedly committed by Micah Johnson, a black man—comes barely a year after a white man, Dylann Roof, allegedly shot nine black people to death in a church in Charleston, South Carolina. Roof told friends, and later police, that he wanted “to start a race war.” “He wanted it to be white with white, and black with black,” said a friend.

Roof’s manifesto echoed the ideas of Anders Behring Breivik, a white Christian nationalist who massacred 77 people in Norway five years ago. Breivik claimed to be defending “our people, our culture, Christendom and our nation.” He declared, “It is every European’s duty to defend their people and country against the ideology of genocide, conquest and destruction known as Islam.”

Nothing helps Roof, Breivik, Duke, and other white nationalists more than hate crimes by the people they vilify—blacks and Muslims—against whites, Christians, and police officers. No crime justifies such collective vilification. But as a social dynamic, haters and killers on all sides work together, by stoking feelings of group victimization and group vengeance.

In December 2014, Ismaaiyl Brinsley, a black man, ambushed and killed two police officers in their squad car in New York City. One officer turned out to be Asian American; the other was Latino. Brinsley had previously expressed anger about police killings of two black men, Eric Garner and Michael Brown. Shortly before the attack, Brinsley posted a message on Instagram: “I’m Putting Wings On Pigs Today They Take 1 Of Ours…… Let’s Take 2 of Theirs #ShootThePolice.”

In January 2016, Edward Archer, a black Muslim, ambushed and shot a white policeman in his patrol car in Philadelphia. Archer said he had targeted police because they enforced laws that violated Islam. “I follow Allah,” he told investigators. “I pledge my allegiance to the Islamic State and that’s why I did what I did.”

Both cases were complicated by diffuse grievances and questions of mental health. Nevertheless, white racists exploited the shooting in New York, and Islamophobes exploited the shooting in Philadelphia. The cries for racial and religious war went beyond American borders. Breivik predicted that the European Union, by “dismantling border controls” against migrants, “could become partly responsible for triggering civil wars in several European countries.” He concluded: “We are in the very beginning of a very bloody cultural war, a war between nationalism and internationalism, and we intend to win it.”

Roof, in his manifesto, expressed similar views. “I saw that the same things were happening in England and France, and in all the other Western European countries,” he wrote. “Europe is the homeland of White people, and in many ways the situation is even worse there.”

These visions of mortal struggle between a white West and its dark-skinned enemies mirror, almost precisely, the ideology of Islamic jihad. Look at Osama Bin Laden’s pronouncements over the years, and you’ll see a striking resemblance to the rhetoric of Newt Gingrich and Donald Trump. Both sides describe and promote a clash of religions, and this unites them in a global alliance against Christians and Muslims—including President Obama, former President George W. Bush, and King Abdullah of Jordan—who argue that the real enemy, terrorism, belongs to no religion. Twelve years ago, in a video message, Bin Laden gloated that it was “easy for us to provoke and bait” the United States into doomed wars in Muslim lands. Last month, after the massacre in Orlando, Florida, Trump embarked on a spree of anti-Muslim demagoguery that played right into the strategy of religious polarization that had just been outlined by ISIS.

This is the war Micah Johnson joined in Dallas on Thursday night. He didn’t join the side of black people, any more than Bin Laden or ISIS joined the side of Muslims. He joined the side of tribal enmity and vengeance. He joined the side of Dylann Roof, Anders Breivik, and David Duke. It’s the wrong side. Reject it.

See more of Slate’s coverage of the Dallas shooting.