The Asian honeybee (Apis cerana) isn't just on the look-out for flowers. In some areas, it's also on the prowl for poo.

When threatened by a species of giant hornet (Vespa soror) - closely related to the murder hornet - workers will fly off to collect fresh animal faeces to smear carefully around the entrance of their nest, according to a study on bee hives in Vietnam.

It's still not clear how this dung actually protects the colony, but in the field, it appears to stop scouting hornets from chewing through the nest and causing mass slaughter.

"We argue that A. cerana forages for animal faeces because it has properties that repel this deadly predator from nest entrances, providing the first report of tool use by honey bees and the first evidence that they forage for solids that are not derived from plants," researchers write.

Scientists have known for several years that honeybees can learn how to use tools in the lab, but such skills have never been observed in a natural setting with non-plant matter.

While it's true honeybees collect materials from plants to build their nests, including nectar, pollen and plant resin, that isn't technically considered tool use (although some scientists disagree with such an arbitrary distinction).

Traditionally, the definition of a tool requires an object to be found externally, before being altered in some way to give it purpose. Wielding this newly arranged material, the animal must then orient the object to make it most effective.

'Faecal spotting', or the smearing of dung on nests, ticks all four of these boxes and is the first clear cut example of bees using a tool in nature.

For Asian honeybees, the authors say it's a remarkable weapon in an "already sophisticated portfolio of defenses" against a formidable enemy.

The giant hornet species, V. soror, is one of the most common in southern Asia and a major killer of native honeybees. On their own, some species of giant hornet can grab and kill thousands of bees within just a few hours. In a swarm, they can sometimes take over an entire nest.

Unfortunately, giant hornets in Asia cannot be chased away with a mere venomous sting. Often, these predators are so big and well-armoured, a poisonous poke from a worker bee won't do much at all.

We already know that honeybees have evolved a unique alarm system against hornets - where a worker bee will retreat to its nest and warn others with pheromones if it spots a hornet.

This triggers hundreds of colony members to swarm the entrance and surround the invader, vibrating enough to heat up and ultimately kill the threat.

It seems their use of poop in the entrance may be another effective technique.

When researchers introduced giant hornets or their nest-marking chemicals in the field, the honeybees began decorating or 'spotting' the entrance of their nest in dung and other filth. This includes both bird and mammal faeces, which are carefully applied around the nest entrance, either as mounded spots or as dung piles.

Even once the attacks had stopped, the bees kept at this for several more days.

What's more, the bees performed "emergency" dances outside their hive entrances when threatened by a hornet, and these little jigs appear to recruit others into smearing the entrance with whatever defences they can find in nature.

Interestingly enough, however, this only happens if the colony is attacked by the V. soror hornet, or if the colony is introduced to that particular predator's nest-marking chemicals.

When attacked by another, less deadly and smaller kind of giant hornet (V. velutina) - one that rarely attacks in swarms and usually grabs individual bees outside the nest - no faecal smearing was observed on the honeybee nest.

Further research will need to figure out exactly how these spots of dung actually deter hungry hornets. The filth could, for instance, contain noxious compounds that repel predators from nests, or they could mask the chemical markers of scouting hornets. What is clear is that poop appears to work.

Without foraging for fresh dung and filth, the study suggests Asian bee colonies would be much more susceptible to giant hornet attacks in Vietnam.

"A colony with moderate or heavy spotting on its hive had a reduced likelihood of visiting hornets landing at and chewing on its entrance, which was the only accessible entry point for attackers," the authors write.

"If hornets did land on a hive, moderate to heavy spotting significantly reduced the time hornets spent attempting to breach the nest by landing near the entrance or chewing on it."

The study was published in PLOS One.