Ant queens who set up their colonies in partnership with one another stand a greater chance of avoiding fatal disease if they bite, dismantle and bury their counterpart after they die.

Researchers studying colony foundation at the Institute of Science and Technology Austria made the discovery while monitoring the behavior of queens of the black garden ant, noting that a queen who performed undertaker duties for its dead co-founder was seven-times less likely to contract a deadly pathogen.

READ MORE: ‘Gigantic mob’ of bees attack in California, six people hospitalized

The authors of the study, published in the journal BMC Evolutionary Biology, speculated that the behavior, unusual given a queen’s reluctance to undertake manual labour, is designed to prevent the spread of disease and ensure the survival of the budding colony.

“It’s unusual that [burying the dead] has also evolved in humans,” Christopher Pull, the lead author on the study, told Newsweek. “But it’s probably a byproduct of living in a social society where we have to contain our dead, and it’s probably the same with social insects.”

During the study, scientists monitored the behavior of the black garden ant which, because suitable nests can prove rare, often co-found their colonies.

The authors of the study found that if two queens shared a nest with only one chamber, and one of them died, 74 percent of the surviving queens would bite and dismantle their dead counterparts. Some 67 percent would then bury the pieces.

In cases where the queens shared a nest with more than one chamber, only 22 percent would dismantle and bury the corpse.

READ MORE: Ancient ‘hell ant’ with metal horns & trap jaw found inside amber (PHOTOS)

“Typically, when we think of ant queens, we think of these monarchs, which are residing deep within the colony and are protected by their workers,” Pull told National Geographic.

“They have no sort of involvement in performing risky and dangerous tasks within the colony. Our study shows that they do possess the ability to perform these behaviors.”

Other social insects to display similar behaviors include honeybees, which have bees tasked specifically in the role of picking up the dead and carrying them out of the hive, and termites.