Is the division of labor a good thing? Depends on who you ask. According to economists, it's made us rich, but new scientific research on ants suggests that it may lead to our extinction in the wake of a surprise attack.

Scientists at the Johannes Gutenberg University of Mainz in Germany compared behavior in ants and found that colonies of highly specialized ants were significantly more likely to perish when members needed to adapt to new situations. Previous studies revealed that there were many advantages to division of labor, linking higher degrees of specialization to better and more effective performance when it comes to individual tasks.

However, the latest study revealed that this specialization had seriously dire consequences for ant communities because, as individuals, highly specialized ants weren't capable of defending themselves against surprise attacks, and therefore put the whole colony at risk.

"In contrast with the widely held assumption that an individual specialization provides social advantages, we have found that specialization can in fact have a negative impact on the propagation and the chances of survival and growth of a colony," co-study author Evelien Jongepier said in a university release.

The research team said that the latest study is important because it shows how specialization can also be deadly when it comes to adaptation.

"Our findings provide an explanation of why all-rounders tend to be ubiquitous and show how important they are for the flexibility and robustness of entire societies," added lead researcher Susanne Foitzik, a professor and evolutionary biologist at the Johannes Gutenberg Mainz University.

The study involved an experiment with 3, 800 ants of the species Temnothorax longispinosus. Foitzik and her team divided ants into two different groups based on behavior. The ants then formed their own colonies of either adaptable all-rounders or efficient specialists.

The team then exposed the colonies to slave-making ants called Temnothorax americanus, which attacked and carried out raids on neighboring Temnothorax longispinosus colonies to steal their young. The researchers explained that the point of this was to examine what happens when ant colonies with different levels of specialization are exposed to outside threats.

The latest findings revealed that specialized ant colonies lost nearly 80 percent of their offspring when attacked by slave-maker ants. However, all-rounder ants were able to save significantly more of their young, with less than half of their brood missing after slave-maker ant attacks. Heavy brood losses are linked to significantly lower chances of future survival of colonies. This is especially true for species like T. longispinosus, which reproduce only once a year.

"In the field, slave-makers represent an evolutionary factor that counteracts the development of higher levels of specialization," Foitzik explained.

"Our results show how important it is to take ecological aspects into account when organizing work and individual patterns of behavior if benefits for the whole society are to be obtained," researchers concluded in their study.

The latest findings were published in the journal Proceedings of the Royal Society B: Biological Sciences.