Termite-hunting ants in sub-Saharan Africa treat each other’s wounds by licking them, according to new research. It might sound icky — but the treatment actually saves lives.

The ant, called Megaponera analis, specializes in raiding termite nests. These hunts, however, are dangerous: The ants can lose legs or antennas, and sometimes they die. A study last year showed that the ants rescue their injured friends in the battlefield, taking them back to the nest. Now, researchers have shown what exactly happens in the nest after those rescue operations. In hour-long sessions, healthy ants take turns licking the injured mate’s severed legs, treating the open wounds. And that reduces mortality by 70 percent, possibly by fighting off infections, according to a study published today in Proceedings of the Royal Society B.

“The ants don’t know why they’re doing what they’re doing.”

Many animals are known to self-medicate: Certain caterpillars feed on poisonous plants to kill parasitic larvae growing inside them, while parrots eat clay to get rid of toxins that bug their stomachs. But when it comes to treating others, the evidence is not as solid. In insects, “it’s completely unknown,” says lead author Erik Frank, a post-doctoral researcher at the University of Lausanne. Today’s study “is the first example of this kind of behavior.” But, Frank warns, it doesn’t mean the ants are particularly intelligent or empathic. The ants have evolved over millions of years to treat the injured, so that those mates can recover, take part in raids again, and remain functioning members of the colony — benefiting all the ants.

“These behaviors that seem to be incredibly complex have a very clear purpose,” Frank tells The Verge. “The ants don’t know why they’re doing what they’re doing.”

Frank and his colleagues observed wild colonies of M. analis ants in the Ivory Coast, painting some of them with acrylic colors to easily track them. The ants attack termite nests as often as four times a day, marching in columns stretching up to 164 feet away from the nest, or about as long as the Niagara Falls is tall. During these raids, some ants are injured, losing legs or antennae, or are handicapped by termites that cling to their bodies. When that happens, healthy ants carry the injured ones back to the nest — most of the times. Some severely injured ants — those that lose five legs out of six — are left behind to die, according to the study.

Frank discovered this by accident. One day, he unintentionally drove his car over one of the ant columns. When he walked back to see the damage he’d done, he noticed that the healthy ants were helping out only those that had lost one or two legs, ignoring the ants that were in worse shape. Frank then found that their triage system is regulated by the injured, not the helper. M. analis ants, in fact, release compounds called pheromones to alert the healthy mates to the need for a rescue mission. But when the ants have many severed limbs and can’t stand up on their own, they just don’t emit those SOS signals, Frank says. “From an evolutionary perspective, it makes sense,” he says. Those ants are probably not going to recover, so they’re not going to be useful to the colony.

What’s more, heavily injured ants will actively sabotage efforts to rescue them. When Frank artificially coated these ants with pheromones, so that they were forced to “ask” for help, the injured did not cooperate in the rescue missions. They kept flailing to make it impossible for the healthy ants to carry them. (After a while, the helpers got frustrated, gave up, and left them behind.)

When the lucky ants were brought back to the nest, the paramedics got to work. Using surveillance cameras that shoot in infrared light to see in the dark, Frank found that four to five ants gather around the injured ant, and take turns licking the severed, wounded leg for two to three minutes at a time. (Ants don’t really have “much of a tongue,” according to Penn State, but “finger-like appendages around the mouth.”) The treatment helps the sick survive: Only 10 percent of ants whose wounds were licked died within 24 hours, compared with 80 percent of those who didn’t receive the treatment.

“These ants have a very complicated medical system, one could say,” Frank says. “That’s what amazes me the most, normally, just to see the complexity in these insects.”

Next, Frank wants to understand how exactly the treatment helps the ants survive. (Does it fight off an infection, or does it prevent the wound from getting infected in the first place?) He’s also interested in finding more insects that show similar behaviors.

The first time Frank saw the ants on camera licking the severed legs, he couldn’t believe his eyes. “We were filming with relatively bad-resolution cameras,” he says. So he went back to the colonies with higher-resolution cameras, and then confirmed what he had seen. He was just as stunned. “I am amazed when I see the complexity to which such simple organisms are able to go,” he says.