African elephants can tell a human friend or foe by their scent, a skill which may be unique in the animal kingdom, a study released on Thursday says.

Researchers who set out to explore reports that elephants behave differently around members of Kenya’s semi-nomadic Maasai people than around others were surprised to find that the animals appear to distinguish human groups based on their different scents.

Researchers from St. Andrews University in Fife, Scotland, monitored the reaction of elephants at Kenya’s Amboseli National Park when exposed to the scent of heavily worn red garments used by a Maasai man and a member of the Kamba clan.

Maasai warriors have been known to demonstrate their virility by spearing elephants. The practice is illegal but persists at low levels.

The Kamba, on the other hand, live by agriculture and pose little threat to the animals.

The scent of both men sent the elephants fleeing, but the scent of the Maasai seemed to instil a greater fear into the elephants, according to the study.

The elephants travelled much faster in the minute after they smelled the Maasai man’s clothing, and they travelled further in the first five minutes of the experiment than they did when they smelled the Kamba man’s clothing. They also took longer to relax.

"We think this is the first time that it has been experimentally shown that any animal can categorise a single species of potential predator into subclasses based on such subtle cues," said Richard Byrne, a professor of evolutionary psychology at St. Andrews.

The research appears in journal Current Biology.

"With any scent of Maasai present, fear and escape reactions seem to dominate anything else," said researcher Lucy Bates.

She noted that the Maasai also use ochre and sheep fat in body decoration, unlike the Kamba.

Curiously, when researchers presented clean, unworn red and white fabrics, they found that the elephants responded to a red cloth with aggression, but not the white one.

Byrne said he thought the difference in the reaction to scents versus colour cues might relate to the amount of risk they sense in the two situations, encouraged by a particularly keen sense of smell.

Safe in the assurance that there were no Maasai in close proximity, the elephants felt secure enough to express their antipathy to their human foe.

The findings that elephants tend to flee at the first whiff of a human also suggests that elephant attacks on humans are probably exceptional events.

"We see this experiment as just a start to investigating precisely how elephants ‘see the world’ and it may be that their abilities will turn out to equal or exceed those of our closer relatives, the monkeys and the apes," said Byrne.