By Victoria Gill
Science reporter, BBC News
Plants have systems for keeping their six-legged inhabitants in check
In Africa and in the tropics, armies of tiny creatures make the twisting stems of acacia plants their homes.
Aggressive, stinging ants feed on the sugary nectar the plant provides and live in nests protected by its thick bark.
This is the world of "ant guards".
The acacias might appear overrun by them, but the plants have the ants wrapped around their little stems.
These same plants that provide shelter and produce nourishing nectar to feed the insects also make chemicals that send them into a defensive frenzy, forcing them into retreat.
Nigel Raine, a scientist working at Royal Holloway, University of London in the UK has studied this plant-ant relationship.
Dr Raine and his colleagues from the universities of St Andrews, Edinburgh and Reading in the UK and Lund University in Sweden have been trying to work out some of the ways in which the insects and the acacias might have co-evolved.
He explains how the ants provide a useful service for the acacias.
"They guard the plants they live on," said Dr Raine. "If other animals try to come and feed on the rich, sugary nectar, they will attack them."
In Africa, one type of ant-guard, known as Crematogaster , will even attack large herbivores that attempt to eat the plant.
Ants will fiercely guard their acacia homes
"If a giraffe starts to eat the leaves of an acacia that is inhabited by ants, the ants will come out and swarm on to its face, biting and stinging," says Dr Raine.
"Eventually, the giraffe will get fed up and move off."
In the New World tropics, the Pseudomyrmex genus of ants fulfil a very similar guarding role.
For both species, the acacias provide little, reinforced structures that the ants hollow out and nest within, as well as sugar-rich nectar for them to eat.
"In return, both groups of ants protect their host plants from herbivores - both hungry insects and larger [animals]," explains Dr Raine.
Give and take
That is the plus side for the plants. But being inhabited by aggressive insects could make one important aspect of a plant's life difficult - flowering.
Flowers need to be pollinated so the plant can reproduce. So what stops the ants from attacking the helpful little pollinators or stealing all the tasty nectar that attracts them?
"Some plants do this structurally, with physical barriers to stop ants getting on to the flower, or sticky or slippery surfaces that the insects can't walk on," said Dr Raine.
"Acacias don't have these barriers. They have very open flowers, but still, the ants don't seem to go on to them. We wanted to know why."
One clever approach by the plant is a food "bribe". "Extrafloral nectaries" are small stores of nectar on stems, from which the inhabitants can feed without going on to the flowers.
Acacias also produce structures called beltian bodies on the leaf tips.
Ants protect the leaves from large herbivores
These, Dr Raine explains, are nutritious structures produced by the plant to feed its resident colony of ant-guards.
But when this isn't enough, it is a case of chemical warfare.
Flowers can produce a variety of chemicals. We can smell some of the volatile organic compounds they release when we sniff our favourite summer bloom.
But there is a more manipulative side to these scents.
Floral volatile compounds can act as signals - drawing in pollinators such as bees and hummingbirds in with their irresistible aromas.
To the ants, however, they are far from irresistible.
"The flowers seem to produce chemicals that are repellent to the ants," said Dr Raine. "They release these particularly during the time when they're producing lots of pollen, so the ants are kept off the flowers."
In recent studies, described in the journal Functional Ecology, Dr Raine and his colleagues found that the plants with the closest relationships with ants - those that provided homes for their miniature guard army - produced the chemicals that were most effective at keeping the ants at bay.
"And that was associated with the flower being open," he says. "So the chemicals are probably in the pollen."
A bribe: Plants provide "nectaries" on their stems
When the pollen has all been taken away - by being brushed on to the bodies of hungry pollinators and helpfully delivered to other plants - the flowers become less repellent.
"So at this point, the ants can come on to the flowers and can protect them from other insects that might eat them, so that the developing seeds aren't lost," he explains.
Dr Raines' team was able to test this using young flowers that had just opened and that contained lots of pollen.
The scientists wiped them on older flowers and on the acacia's stems.
This showed them that the effect was "transferrable" - the stems and older flowers that had been wiped became more repellent.
"It gives this really neat feedback system - the plant is protected when it needs to be protected, but not when it doesn't."
The repellent chemicals are specific to the ants. In fact, they attract and repel different groups of insects.
"[The chemicals] don't repel bees, even though they are quite closely related to ants. And in some cases, the chemicals actually seem to attract the bees," says Dr Raine.
The researchers think that some of the repellents that acacias produce are chemical "mimics" of signalling pheromones that the ants use to communicate.
"We put flowers into syringes and puffed the scent over the ant to see how they would respond, and they became quite agitated and aggressive" he explained.
"The ants use a pheromone to signal danger; if they're being attacked by a bird they will release that chemical that will quickly tell the other ants to retreat."
Dr Raine says this clever evolutionary system shows how the ants and their plants have evolved to protect, control and manipulate each other.
The ants may be quick to swarm, bite and sting, but the harmless-looking acacias have remained one step ahead.