Move over, ant farms — ant hospitals are where the action is. Scientists studying African Matabele ants in Ivory Coast found that the insects act like paramedics in a crisis, triaging and treating the wounds of their injured peers.

The discovery, never before observed in insects, is described in the Proceedings of the Royal Society B. It documents a sophisticated system that helps determine which ants are most likely to survive a combat injury.

Ants are often thought to live in systems where the individual worker doesn’t matter much. That’s because many ant species live in giant colonies whose workers usually have very short life spans relative to the queen, and because the queen can lay eggs for new workers at a fast rate.

“The benefit from helping injured ants in this scenario is small, because replacing them should be easier,” the scientists wrote. “At the same time, if injuries were mainly fatal, the benefit of a rescue behavior focused on injured individuals would again be marginal.”

That’s not the case for ants such as Megaponera analis, which venture out in raiding parties of 200 to 600 individuals, attack termites and carry their prey back home. The hardheaded termites don’t go without a fight. Many invading ants lose legs or end up with termite mandibles dug into their bodies.

Surprisingly, the returning ants don’t abandon all their casualties: Before returning home they look for their injured comrades, which send out a “distress signal” pheromone. Within 24 hours of being taken back to the nest and treated, maimed ants can switch to a four-legged or five-legged gait that lets them run almost as fast as their six-legged peers.

Because these injured ants can still do almost the same things as their healthy peers, it makes sense to bring them home and treat them — especially since roughly a third of the ants that run these termite raids have lost a leg at some point in their life.

Gravely injured peers are usually left behind — and those ants did not try to save themselves by getting help.

At the nest, the paramedic ants pulled any tenacious termites off the injured insects’ bodies and cleaned open wounds by “licking” them intensely, sometimes for several minutes. The scientists think that the insects may have antimicrobial agents in their saliva that might help stave off deadly infection. Whatever the reason, their ministrations worked: only 10 percent of the ants that got treatment died. Without that medical attention, 80 percent of those ants would die.