Ants are crafty buggers: They wage war, have pioneered the insect equivalent of agriculture, can assemble their bodies into living rafts and bridges, exhibit swarm behavior that takes on properties of both solids and liquids, enslave other ants, and then stage slave-ant rebellions. And there’s now confirmed evidence that when ill they medicate themselves, broadly speaking, with drugs.

Biologists at the University of Helsinki fed Formica fusca ants one of two ways: a honey diet, or a honey-laced-with-hydrogen peroxide diet. Hydrogen peroxide is what’s called a reactive oxygen species, which essentially means that 1) it contains oxygen and 2) damages cell structures. As the researchers point out in the journal Evolution, hydrogen peroxide is harmful to ants, increasing the bug mortality rate from about 5 percent at baseline up to 20 percent in the hydrogen peroxide-laced diet.

But here’s the rub. If the ants were infected with a fungal disease that could be treated by ingesting hydrogen peroxide, ants would opt for the hard stuff. The fungus killed ants at a 60 percent rate — except for those ants with access to the hydrogen peroxide honey, who, despite the danger, often chose to eat it anyway. Their mortality, even as they ingested what is in effect a poison, dropped to 45 percent. In an email to Inverse, lead author and entomologist Nick Bos writes:

Our study adds to the knowledge of self-medication in that it is not just a black and white response. The ants get sick, but they still manage to choose their food according to their needs. They don’t just eat all the medicine they can get, but dose it according to its concentration.

The word self-medication is often used, but the amount of times it has been fully shown are rare. Even though examples of potential self-medication in mammals are plenty, showing that it is actual self-medication and not compensatory diet-choice is very hard. Self-medication requires that the medicine is harmful to healthy individuals (while compensatory diet choice implies the medicine is not harmful), and force-feeding a medicine to primates to show this cost is very unethical. This is where research on insects is very useful. Doing a large-scale experiment like we did is simply not possible with vertebrates.

To be clear, the experiment took place in the confines of a lab. But would infected ants be able to get their hydrogen peroxide fix in the wild? Bos thinks that could be the case. “[Reactive oxygen species] are present in decomposing carcasses and nectar,” he says, “but plants also defend against aphid infestations by releasing ROS in their tissues. All these three are possible sources for the ants.”

Ants aren’t the only ones getting by with a little help from chemical friends. A 2013 review in Science demonstrated that, sure, primates can learn to medicate against parasitic infection, but there are innate responses among many less cognitively-advanced species. Wood ants, the authors point out, harvest tree resin and bring it into their colonies to kill microbes.

Ants, man.

Photos via Wikimedia.com/Sedeer El-Showk