Talk about long-suffering moms—some female spiders allow their young to eat them alive, a new study says.

The species Stegodyphus dumicola, native to South Africa, lives in large family groups that share both communal nests and childcare duties.

Only about 40 percent of the females get the chance to reproduce because they mature more slowly than the males, and those that don't—the so-called virgin females—go to extreme lengths to care for their sisters' babies.

Once the eggs hatch, both mother and virgin females begin producing a nourishing fluid, which they feed to the offspring by mouth. (See National Geographic's pictures of animal mothers and babies.)

“This is a very intense process. In the end, the female will basically start to liquefy, and will use up almost all of her resources," says study co-author Anja Junghanns, an evolutionary biologist at Germany's University of Greifswald.

"When she is almost depleted, the offspring will crawl onto her and start eating her.”

Matriphagy, or mother-eating, is exceedingly rare in nature, but Jo-Anne Sewlal, a fellow of the Zoological Society of London, says that the behavior has been documented in some species of insects, nematode worms, and other arachnids. (Read more about cannibalism in other animals.)

"While it may seem unthinkable for a child to cannibalize its mother," Sewlal says, "it's important to understand matriphagy has evolved over many generations to be the most effective means of ensuring the survival of the species."

It's All in the Family

For their study, Junghanns and colleagues set up an experiment in which they placed two mated female spiders and three virgin females with several young spiders. The results, published in the October issue of the journal Animal Behavior, showed that all females cared for—and sacrificed themselves to—the offspring equally.

Such cooperative breeding is uncommon, found in only around 3 percent of all known species. It's also unusual among spiders, most of which disperse almost immediately upon hatching and live alone.

Mother-Eating Spiders Young spiderlings attack and eat their mother for survival.

But S. dumicola hatchlings live together for life, which leads to interbreeding—brothers mate with sisters, and so on.

This interbreeding may explain why virgin females care for relatives' offspring: Because the spiders share so much genetic material, a female might assume the offspring is her own. (See "6 Fierce Animal Moms That Go to Extremes For Their Young.")

One Thing on Their Mind

So what are the male spiders doing during all this?

“They are generally not doing a lot—just mating,” says Junghanns. Their lives last less than a month after copulation. In comparison, females live about a year.