Workers in wasp nests sometimes kill their queens, even though these egg-laying wasps are also their mothers. Now, researchers think they might know why such murders take place — so that workers can give birth to sons of their own, according to a new study.

Wasps are often social insects that live together in nests. Wasp colonies are usually founded in the springtime by a single queen that first gives birth to female workers and later to male drones and female queens. These young virgin queens fly off in the fall to mate with males and hibernate over the winter to start the cycle anew in the spring.

Workers typically devote their lives to helping the queen give birth to offspring by collecting food, taking care of the nest, raising the brood and defending the colony. But previous research found that workers sometimes killed their mothers, and it was a puzzle as to why these workers committed matricide. [Googly Eyes: Photos of Striking Wasp Faces]

To explore this mystery, behavioral ecologist Kevin Loope at the University of California, Riverside, reared 18 colonies of yellow jacket wasps in a lab. Loope recorded the wasps continuously using video cameras, and he saw three matricides. Loope also collected 31 mature colonies from the wild and found that 13 showed telltale signs of matricide, such as being mature queenless colonies.

Loope analyzed the genes of workers from 21 of the 31 colonies he collected from the wild. He found that workers kill queens when they are in colonies with lots of full siblings — that is, when many of the denizens of each colony had the same father. Workers did not kill queens when there was a mix of full and half siblings. (Queens usually mate once or twice before they start giving birth.)

The explanation for this pattern might lie in how workers can lay eggs, the researchers said. Although workers do not have sex, and are often thought of as sterile, they can occasionally give virgin birth to male eggs. However, these eggs are often eaten by the queen, and the queen typically attacks egg-laying workers.

In theory, if a queen died, workers could then lay eggs and give birth to males. If all the workers in a colony were siblings, then the resulting males would all either be sons or nephews of the workers. This means that each worker would have improved their chances of passing on their genes to future generations.

However, if the queen died but if each worker in a colony was not closely related, then the resulting males would all either be sons or more distant relatives. This means each worker would not have greatly improved their chances of passing on their genes.

Evolutionary theory suggests that organisms typically evolve behaviors that favor close relatives over more distant ones. "[M]atricide is less beneficial in colonies with many half-siblings," Loope said in a statement. This theoretical prediction, initially proposed more than 20 years ago, was confirmed by the findings of this study.

"Most people think of social insects as workers toiling mindlessly for the good of the queen or the colony, but it appears that workers are more calculating, and help or harm the queen depending on the circumstances they find themselves in," Loope said in a statement. "Workers are not mindless automatons working for the queen no matter what. They only altruistically give up reproduction when the context is right, but revolt when it benefits them to do so."

It remains uncertain how workers can tell if they are closely related to others in their colony or not.

"One obvious candidate is the variability of chemical profiles that the workers of each colony possess," Loope told Live Science. "It could be that workers from colonies with high genetic diversity, those with lots of half-siblings, have greater variation among their chemical profiles, while workers from genetically similar colonies, those with a single father, have lower variation among them."

Loope detailed his findings online Oct. 29 in the journal Current Biology.

Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.