In 1974, Jane Goodall witnessed a disturbing scene in Gombe Stream National Park, Tanzania. A gang of male chimpanzees invaded their neighbors’ territory and attacked a male chimp sitting by himself in a tree. The intruders dragged the chimpanzee to the ground, pinned him down, and bit and hit him all over his body. The attack ended when one member of the gang threw a rock at the bleeding victim. The battered chimp was never seen again and presumably died from his injuries.

The murderous chimpanzees weren’t attacking a stranger: They had recently all belonged to the same group. When the group split in two, one community took over the northern half of the range and the other the southern half. From 1974 to 1977, during the “four-year war,” the northern males obliterated the southern community, hunting down and killing all of its adult males. The northerners took over their enemies’ territory and females.

This was the first time scientists had documented “warfare” among chimpanzees. It wasn’t the last. Since then, researchers have recorded similar violence in a variety of places where the animals are studied. Discovering that our closest living relatives are capable of such slaughter led some anthropologists to suggest that an instinct to kill may be a grisly trait that humans and chimpanzees inherited from their common ancestor some 7 million years ago. The conclusion: Violence is just part of human nature, stamped in our DNA.

But there’s another way to interpret what chimpanzee behavior says about our own brutal ways. Instead of humans and chimps being natural born killers, violence in both species may be more a matter of circumstance. To understand why, it helps to know about aggressive sneak attacks in another primate species: spider monkeys.

Spider monkeys are acrobatic, Scottish-terrier-size primates with absurdly long limbs—five of them if you count their grasping tails, which can hold on to tree branches. They hang out in the treetops of Central and South America. In 2002 to 2003, anthropologist Filippo Aureli of Liverpool John Moores University in England and his colleagues observed seven instances of male spider monkeys from one group, in the eastern part of a field site in Mexico, raiding the territory of their neighbors to the west and wreaking havoc. It was the first time scientists had reported spider monkeys acting violently toward another group.

The raids followed a similar script. Three or four adult males of the eastern community would descend to the forest floor—which they normally avoid—and form a single-file line. The monkeys walked on all fours with their tails sticking straight up—another thing they don’t normally do. As the monkeys marched into the homeland of the western community, they were as stealthy as a group of Green Berets. They didn’t snap twigs. They didn’t rustle leaves. Sometimes they would stop, stand up on two legs, take a look around, and listen.

In one instance, the band of males climbed a tree and surprised an adult female of the western community. The males grabbed and bit her. She screamed, and her adult son galloped in to defend his mother. A fight broke out, a true rumble in the jungle that lasted for about seven minutes. The attack ended in a stalemate, and the eastern monkeys returned home. On another occasion, Aureli’s team watched a crew of eastern males chase a western female to the edge of a lake. Spider monkeys aren’t known to be swimmers, but with no other option, the female jumped in. Her attackers followed, which resulted in a lot of screaming and splashing. The male monkeys managed to return to dry land while the female waded across a small bay and escaped into the forest.

These spider-monkey raids sound a lot like chimpanzee attacks. But it’s hard to make the case that spider monkeys, chimps, and humans all engage in violent behavior because of common ancestry, given that spider monkeys are separated from chimpanzees and humans by about 35 million years of evolutionary history and plenty of peaceable primate species. Instead, similar qualities in their social lives may favor violence.

Spider monkey, chimpanzee, and—debatably—traditional human societies are all examples of fission-fusion social systems. Group members don’t hang around together all the time. Throughout the day, they break into smaller, fluid parties with ever-changing memberships, probably because their food is spread out in such a way that a large group’s needs can’t be satisfied by the same patch of grub. Once females come of age, so to speak, they leave their group to find a new community, while males stay where they were born. As a result, adult males in a group tend to be related, and the ties of kinship help them forge strong bonds and coalitions that work together to patrol the boundaries of their territory.

These fission-fusion societies create opportunities for violence, says Richard Wrangham, an anthropologist at Harvard University. Because communities subdivide during the day, it’s likely that a subgroup from one community will encounter a smaller subgroup (or even a solitary individual) from another community near their border. Given this imbalance of power, as Wrangham calls it, the risk of getting injured in an attack is low for members of the larger subgroup, and a successful assault is possible.

This isn’t senseless violence. Male chimpanzees seem to resort to warfare to weaken their neighbors, with the ultimate goal of expanding their own territories, gaining new resources, and attracting new mates. It worked at Gombe, where increasing territory for the victors also led to higher infant survival rates, shorter intervals between births, and other benefits due to the better supply of food. Lethal raids have also helped chimpanzees living in Tanzania’s Mahale Mountains and Uganda’s Kibale National Park take over terrain from their neighbors.

(Skeptical anthropologists such as R. Brian Ferguson of Rutgers University, however, argue that chimpanzee violence is actually abnormal behavior that’s a consequence of human interference. For example, Goodall initially lured chimpanzees to her study site with bananas, and the provisioning might have disrupted natural relationships among the chimp groups. At other sites, deforestation might play a role—and is being blamed for recent wild chimp attacks on humans in the Democratic Republic of the Congo.)

In the case of spider monkeys, Aureli’s team says the raids began after a lonely spell for the males of the eastern community—it was the longest period in at least five years that all of the females in their group had nursing infants, meaning that none of the mothers was ready to get pregnant again. Storming into their neighbors’ territory may have been the eastern males’ only chance to find potential new mates. Even if harassment seems like a strange courtship strategy, in at least one instance, a female from the western community spent a few hours with the eastern males following an attack (although no mating was observed).

These examples show how similar social and ecological factors may have allowed spider monkeys and chimpanzees to independently evolve a capacity for violence through convergent evolution. That doesn’t mean these primates are programmed to attack. Variation within and between species demonstrates how flexible their behavior is, responding to different circumstances as they arise.

Chimpanzees are a good example of this flexibility. In the Taï Forest of Ivory Coast in Western Africa, chimps are less violent than they are in Eastern Africa. Christophe Boesch of Germany’s Max Planck Institute for Evolutionary Anthropology thinks there are fewer chimp murders at Taï because the chimpanzees have more tight-knit communities. The animals probably stay in closer contact throughout the day because the risk of being eaten by a leopard is higher at Taï than at other field sites, and safety in numbers is their best defense against this predator. As a consequence, it’s less likely that a gang of male chimps will find a vulnerable individual to attack.

And then there’s the bonobo. Bonobos are a different species of great ape, found only in remote parts of the African Congo, that split from chimps just 1 million years ago. Bonobos live in the same sort of fission-fusion social system as chimpanzees, yet these primates are peaceful—possibly because they are a female-centered species. When bonobo females enter a new group, they make strong friends and allies with other females. And when a group encounters another community, females will mingle with the outsiders, even mating with their neighbors, both male and female. Although scientists are still trying to understand why chimps and bonobos differ, Takeshi Furuichi of Kyoto University in Japan suspects female bonobos’ greater willingness to mate with males has something to do with it. Unlike female chimps, female bonobos mate with males even when they are already pregnant, which may help minimize aggression and fighting among males within and between groups.

Spider-monkey violence is still a bit of an enigma. Since these primates have not been as well studied as chimps, it’s not clear how common spider-monkey raiding is or whether it varies from site to site. Aureli and his colleagues predict that, in general, it’s probably rare compared to chimp attacks because spider monkeys live in smaller territories and at higher densities. It’s probably unusual for a group of male spider monkeys to come across a lone individual vulnerable to attack.

What, if anything, do these examples of primate behavior say about the origins of human warfare? Anthropologists suspect that early hominids lived in fission-fusion societies. If that’s the case, then our earliest ancestors probably engaged in some violent attacks. But as modern primates reveal, the violence was probably variable. Not all early hominids necessarily raided and killed their neighbors. Unfortunately, finding evidence for war in the archaeological record is difficult. Warfare probably didn’t escalate in size and frequency until the past few hundred thousand years, as Homo sapiens evolved and developed greater brainpower and more complex culture, and more things to fight over. Today, human biology, ecology, and culture interact in ways that allow humans to be the most violent, despicable beings on Earth—as well as the planet’s most compassionate, cooperative creatures.