Call it Game of Thorns. A prickly tree that grows in the clay-rich soils of East Africa recruits stinging ants to defend itself from gnawing giraffes and marauding bull elephants. In return, the trees provide nectar and shelter—swollen thorns—for the insects. The rewards are so attractive that, in a drama reminiscent of a medieval fantasy TV show, four native ant species battle each other to inhabit the trees. But according to a new study, this warring kingdom is under siege by an even more violent outsider. The consequences could affect elephants, other large wildlife, and perhaps the future of iconic reserves such as Serengeti National Park.

The tree in question is called the whistling thorn acacia (Acacia drepanolobium). These trees have evolved a mutualistic relationship with native ants. When herbivores try to strip away its leaves or moody elephants attempt to rip off branches, the ants rush out of their arboreal homes to bite and sting the threatening animal. Elephants have such an aversion to the ants that they will avoid eating the acacia, which helps prevent the woody savanna from becoming a grassland.

The ecology of this system is fascinating. The four species of native ants compete ferociously with each other to occupy each tree. Three species, in the genus Crematogaster, feast on nectar that the tree produces for them in specialized organs called nectaries. Jacked up on sugar, they will rush to fight any foreign ant, curling around it and clenching the abdomen in a death grip with their bodies.

The fourth native species, Tetraponera penzigi, however, has a passive-aggressive strategy for monopolizing the trees it inhabits. With no taste for nectar, T. penzigi destroys the nectaries, reducing the appeal of the tree to other species. (T. penzigi harvests fungal spores and pollen and farms fungus.) And unlike Crematogaster, when T. penzigi are attacked, they retreat into the swollen thorns and defend them with stingers.

Regardless of how they fight each other, all the species will defend the tree from elephants and other herbivores. And thus it has been for millennia. But about 4 years ago, researchers in central Kenya became aware of the arrival of the bigheaded ant (Pheidole megacephala). No one knows where the bigheaded ant originally came from, perhaps southern Africa or Madagascar. But it’s clear that it is a persistent and highly successful invader. Living in supercolonies that cooperate, they have devastated all manner of insects on several continents. “Anything they can attack, they will destroy,” says Todd Palmer, an ecologist at the University of Florida in Gainesville.

To understand the threat to the native ants, Palmer and colleagues wanted to witness an attack on acacia trees. They cut down 16 small trees, each inhabited by a single species of native ant, from a part of the savanna not yet invaded. Then they trucked the trees—ants and all—to the Mpala Research Center in central Kenya, which has a high density of bigheaded ants.

Soon, columns of bigheaded ants streamed into the trees. Crematogaster ants sent an alarm, calling other ants out of the swollen thorns. Although Crematogaster ants are five times larger than bigheaded ants, they were overwhelmed within an hour or two. Swarms of attackers grabbed Crematogaster ants by the legs, pulling them spread-eagle and cutting them up. As the Crematogaster troops fell, the invasion front moved up the trees. “The bigheaded ants just keep coming,” Palmer says. “They are unstoppable.” When bigheaded ants reached the Crematogaster nests inside the swollen thorns, they pulled out the brood and brought them back to their own nests. There, they fed them to their larvae.

T. penzigi fared better. They hastily retreated into the swollen thorns, staying inside for up to a month. If caught outside, they flattened themselves and froze. Attacking ants seemed to not recognize them as ants, Palmer says, perhaps because of a chemical camouflage. “It’s the most timid ant that can withstand the battle,” he says. They may even profit: It seems that the extirpation of the three species of Crematogaster opens up other trees that T. penzigi can sneak into; Palmer and colleagues found a much higher density of T. penzigi where the bigheaded ants had invaded, they report in an article posted online in Ecology.

The same behaviors were seen in laboratory experiments with the various species. “The study itself proved far more interesting than I dared expect, with our staged ant battles reminiscent of the Lord of the Rings battle scenes,” says first author Corinna Riginos, a research ecologist at the Teton Research Institute of Teton Science Schools, Jackson, Wyoming, who designed the study.

The invasion could have consequences beyond the fate of the native ants. Crematogaster do the best job defending acacia trees. T. penzigi is less effective, and the bigheaded ants won’t fight anything much bigger than a human thumb. Without native ants to guard them, Riginos and Palmer wondered, would acacia trees suffer more harm from elephants?

They examined three sites invaded by the bigheaded ants and found five times as many acacia trees with moderate or worse damage from elephants, relative to uninvaded sites. The mutualistic relationship between the ants and the acacia, by mediating elephant damage, is a key influence on the amount of tree cover in the savanna. So the breakdown of the relationship is a significant threat to a landscape that includes Serengeti, Maasai Mara, and Nairobi national parks, Palmer says. “It is a substantial effect they are seeing,” says Han Olff, an ecosystem ecologist at the University of Groningen in the Netherlands who was not involved in the research.

The influence of the bigheaded ant is unlikely to be apocalyptic or vast, though. Johan du Toit, an ecologist at Utah State University in Logan—who was not involved in the paper—says that the consequence of losing these native ant species will likely be limited to the area where this acacia species is dominant and elephant are abundant, particularly Kenya and Tanzania. “Even for this acacia, losing the ants doesn’t mean it will be completely eaten up by elephants,” he says. “It’s a pretty resilient tree.” Olff adds that it can be difficult to predict exactly how the ecosystem will respond to the perturbation.

The next step, Palmer says, is to look at how this invasion affects landscapes where various kinds of wildlife are present or absent. It’s possible that when elephants are not around, the trees may actually benefit from an invasion by the bigheaded ant, because they wouldn’t need to produce nectar for native species and could use the energy to grow instead.

The key message is the need to improve biosecurity to prevent such invasions, says Lori Lach, a community ecologist at James Cook University, Cairns, in Australia. “We can’t be complacent about invasive ant spread, even of species that have mostly fallen off the radar of active management around the world,” she says. “Our best chance at preventing detrimental effects by invasive ants is by increasing investment in biosecurity and by detecting and destroying them at borders.”

*Update, 8 September, 3:05 p.m.: This article has been updated to reflect the fact that Corinna Riginos played the primary role in the research.