The finding, illustrated in a video of the mercenary ants, highlights that parasites might not always be a bad thing, underscoring the complex relationships between species in nature, investigators added.

Scientists investigated ants in Panama named Sericomyrmex, which raise fungus in gardens. The farmer ants are regularly beset by parasitic ants named Megalomyrmex. Queens of Megalomyrmex stealthily enter and colonize the gardens of Sericomyrmex and can feed on their offspring and their fungus for years. They also clip the wings of the virgin queens of the farmers, hampering the spread of Sericomyrmex colonies.

Ant soldiers

Evolutionary biologist Rachelle Adams at the University of Copenhagen had studied Megalomyrmex for more than a decade when she noticed they were remarkably common compared with other parasitic species, at times making up than 80 percent of some host populations.