Nature is, it’s often said, red in tooth and claw. But sometimes a claw scratches someone’s back in return for a symbiotic scratch of one’s own. Ants provide many examples of such mutually beneficial arrangements. As weird as it sounds, drinking the “blood” of a wounded bittersweet nightshade plant appears to be one of them.

Ants and plants are often good friends (leafcutters aside) because ants prey on insects that munch on the plants. Some plants keep ants on retainer by secreting nectar from special structures (fittingly called “nectaries”) that can be found in various parts of the plant. The acacia tree even goes as far as growing hollow thorns that ants can nest inside when they aren’t dining on the gourmet ant food the tree provides. (Full disclosure: acacias also drug the ants so they can’t live off other food sources. It’s a complicated relationship...) The benefits the tree obtains from its ant security detail apparently outweigh the energetic costs of these lavish gifts.

Something a little more subtle is going on with the bittersweet nightshade plant. A group of researchers led by Tobias Lortzing of the Free University of Berlin noticed that this nightshade bleeds sugary droplets when damaged, rather than quickly closing up its wounds. Seeing ants hit up those droplets for a snack, they wondered whether the plant adapted to call in ant support when herbivores come a-munching.

First, they took a look at what the plant was “bleeding." You might have assumed it was just sap, but it was chemically different. It was mostly sucrose, missing the other sugars found in the sap. And it included trace ingredients normally found in nectar, rather than sap. Plants with nectaries will secrete the sweet stuff when afflicted with herbivores, but the bittersweet nightshade doesn’t have nectaries—it just releases nectar on-demand from any wound.

In greenhouse experiments, the researchers confirmed that ants spent more time on plants with wounds—and not just on the wounded leaves. To see how much this benefited the nightshade, the researchers worked with naturally growing plants in the wild. Every other day, they left droplets of sugary water on some of the plants and droplets of pure water on others. They counted significantly more ants on the plants with faux wound nectar and found half as much damage from nibbling herbivores.

The details of that damage get interesting. Two types of herbivores dominated: slugs and flea beetles. The ant protection only reduced slug damage, making no difference in the little holes chomped by flea beetles. That’s surprising, the researchers say, because ants weren’t really known to attack slugs. But back in the greenhouse, slugs vs. ants proved to be downright gladiatorial. Those slugs that avoided death by ant dropped 20 percent of their weight, while the nightshade plants enjoyed reduced slug feeding.

The weird thing is that the small holes made by flea beetles caused most of the wound secretions the researchers observed in the wild. If the ants don’t chase off those beetles, is there any benefit to the plant? There is, the researchers found—but it involves the flea beetles’ larvae rather than the leaf-munching adults.

While the larvae hatch down on the ground, they climb upwards in search of young shoots, into which they burrow and feast. The researchers released larvae at the base of a number of nightshade plants—some with ants brought in by nectar from adult beetle wounds—and watched to see how many made it to shoots. While the ants didn’t intercept them all, they did nab a few from each plant. Checking back two weeks later, the ant-protected plants had grown more than their unprotected counterparts.

The bittersweet nightshade isn’t the only plant that we know that produces nectar from wounds, but the others haven’t been studied like this. Plant-insect alliances fostered by specialized “nectary” structures are well-known, though. Since the great variety of nectaries points to many instances of independent evolution, it could be that the bittersweet nightshade’s generalized nectar production represents the ancestral condition that spawned them all.

The researchers tip their hats to Florida International University’s Suzanne Koptur, who wrote in a 1984 paper that “nectaries may well have originated as chance fissures in the epidermis of some species through which phloem sap oozed and was visited by ants." The bittersweet nightshade makes that hypothesis seem even more plausible.

Nature Plants, 2016. DOI: 10.1038/nplants.2016.56 (About DOIs).