To most people, elephants sound the same. Unless, you’re very experienced, it would be hard to tell the difference between two elephants based solely on their voices. They, however, have no such problems with us.

Karen McComb and Graeme Shannon from the University of Sussex have now shown that wild African elephants can tell the difference between the voices of humans from two ethnic groups, and react accordingly. They can even discriminate between the sounds of men and women, and adults and boys.

This ability matters because, to an elephant, not all humans are equal. They have no quarrel with the agriculturalist Kamba. But they often come into conflict with the cattle-herding Maasai over access to water or land, and they sometimes leave these clashes with a flank full of spears.

Back in 2009, Lucy Bates and Richard Byrne from the University of St Andrews showed that elephants at Kenya’s Amboseli National Park can distinguish between the smell of Maasai and Kamba clothes. If they sniffed eau de Maasai, they were more likely to flee into long grass. They behaved in the same way if they saw the distinctive red colour of Maasai clothes. McComb and Shannon’s study is a sequel of sorts. They showed that elephants can rely on sounds as well as smells to assess the threats they face.

The team recorded 20 Maasai and 15 Kamba saying “Look, look over there, a group of elephants is coming” in their respective languages. They then played these recordings to 48 family groups of Amboseli elephants. The herds obviously couldn’t understand the meaning of the words, but they could tell the difference between the two languages. When they heard the Massai voices, they were much more likely to bunch up into defensive clusters and sniff the air with their trunks. They knew which group was more dangerous.

They also seemed to know which people within the groups pose the greatest threat: they behaved defensively when they heard Maasai men rather than women, and adults rather than boys. “I don’t find this at all surprising, since voice pitch alone enables that distinction,” says Byrne. “But the details that differ between Maasai and Kamba languages are presumably more subtle.”

But when McComb and Shannon altered the Maasai recordings so that the male and female voices had the same pitch, the elephants could still tell them apart. They must have been picking up on some features that are subtler than mere frequency.

Still, that’s not surprising. Elephants are big-brained and extremely intelligent. They communicate with a wide range of sounds. They are long-lived, so they can build up a substantial lifetime of experience, and they live in tightly knit social groups, so youngsters can benefit from the knowledge of their elders. “The surprising thing was just how clued up they were,” says McComb. “They were really able to make these distinctions very well and they rarely got it wrong.”

They can also tailor their responses to different predators. Their main threats are humans and lions. In an earlier study, McComb and Shannon found that elephants can tell the difference between the roars of male and female lions. They react to these roars by forming defensive circles and then noisily mobbing the source of the sound. (Watch them react below.)

But when they heard the Maasai voices, they were much less aggressive. “Coming towards humans with spears would be very detrimental,” McComb deadpans. “They behaved as if they were expecting to see Maasai.” They also went into stealth mode; they only made audible noises 10 percent of the time after hearing Maasai speech, compared to 67 percent after hearing lion roars.

In a related study, Joseph Soltis, who works at Disney’s Animal Kingdom, found that elephants react differently to two distinct threats: talking humans and buzzing bees. Bees can sting elephants in vulnerable places like their eyes or inside their trunks, and elephants are so scared of this that they’ll flee if they hear buzzing.

Soltis’ team showed that Kenyan herds make distinct alarm calls when they hear either humans or bees, and they can modify the tempo and pitch of the calls to show how urgent the threats are. They also react accordingly. When the researchers played the calls back to the elephants, they found that both alarms would prompt the herds to keep watch and run away. But the bee alarm specifically makes them shake their heads, presumably to knock away any nearby stings.

These studies are testament to the keen intelligence, rich social lives, and sophisticated communications of these largest of land animals. As Ferris Jabr beautifully writes, “To look an elephant in the face is to gaze upon genius.”

But the results also speak to the sad history of conflicts between humans and elephants. These conflicts must have played out many times over for the animals to build up enough experience about which humans are the most dangerous.

“The level of spearing has gone down quite considerably in recent years,” says McComb. The Maasai are now partners in Amboseli National Park. They also get compensated if elephants accidentally kill their livestock, which stops them from spearing the animals in retaliation. Still, the sound of Maasai still sets them on edge. This suggests that once at least some members of the family have a bad run-in with humans, the others learn from her and the fear stays in the group.

Still, McComb adds that “elephants are very good at living alongside humans by avoiding dangerous situations. But when we start doing something dramatically different, like a huge increase in poaching or using automatic weapons, they can’t adapt fast enough. That’s when we need to step in and protect them.”

Fritz Vollrath from Oxford University, who was involved in the bee study, adds, “Knowing how elephants perceive their social and physical environments and how the communicate their perceptions between one another will allow us to not only better understand them but also to better protect them in the wild.”

References: McComb, Shannon, Sayialel & Moss. 2014. Elephants can determine ethnicity, gender, and age from acoustic cues in human voices. PNAS http://dx.doi.org/10.1073/pnas.1321543111

Soltis, King, Douglas-Hamilton, Vollrath & Savage. 2014. African Elephant Alarm Calls Distinguish between Threats from Humans and Bees. PLoS ONE http://dx.doi.org/10.1371/journal.pone.0089403

More on elephant behaviour: