When Khali, a sloth bear at the Smithsonian's National Zoo in Washington, D.C., went into labor in late December last year, her keepers were thrilled. But soon after Khali delivered her first cub, something went wrong.

"We don't really know what happened," says Tony Barthel, a mammal curator in the zoo's Asia Trail section. He and the bears' keepers were watching Khali on a closed-circuit television. They cheered when they saw the palm-size cub come into the world.

Then, 20 minutes later, Khali—still in labor with other cubs—bent down, not to lick her newborn, but to eat it. The cheers turned to gasps of dismay.

"Our assumption is that the cub was not well, and it died," Barthel says.

Khali gave birth to two more cubs that day, and for the next week, she was as attentive, calm, and nurturing as a mother sloth bear could be. (She was an experienced mom, having raised two other cubs at a different zoo in 2004.)

The keepers continued to monitor her and her cubs, as they do with all bear mothers. So they were on hand when Khali ate another of her babies and turned her back on the third.

Rescuing a Baby ... From Mom

Barthel and the keepers decided they had to intervene. On January 6, they retrieved Khali's last surviving infant—a female—from her den. They rushed the cub to the zoo's veterinary hospital, where she was found to be hypothermic and suffering from an infection.

"She was ill, with an elevated white blood cell count," Barthel says. "We don't know if this was the case with her other two cubs, but my assumption is they were not well."

Shortly afterward, all the sloth bears fell ill with a flu virus, which may have caused the cubs' illness.

View Images The sloth bear cub is bottle-fed at the zoo in Washington. PHOTOGRAPH BY MINDY BABITZ, THE SMITHSONIAN'S NATIONAL ZOO

To save the lone cub, the veterinarians immediately treated her with antibiotics and placed her in an incubator to restore her body temperature. A few hours later she was happily nursing from a bottle.

And the keepers were left trying to answer what seems the cruelest and most unthinkable of questions: Why would a mother eat her own young?

Babies as Food

"It can seem unnatural," Barthel says, "but there are reasons. They might sound cold to us, but they're simple—and they have to do with resources."

Indeed, mother bears, felines, canids, primates, and many species of rodents—from rats to prairie dogs—have all been seen killing and eating their young. Insects, fish, amphibians, reptiles, and birds also have been implicated in killing, and sometimes devouring, the young of their own kind.

When mammalian mothers give birth, they must begin nursing their infants—something they can do only if they're healthy and well nourished.

But if, for instance, a mother bear in the wild gives birth to unhealthy or deformed cubs, or is unable to find enough to eat, she will typically kill and consume them.

"They become a resource, one she can't afford to waste," Barthel says.

A mother bear—or lion or wild dog—does the same if she can't nurse her cubs or find food for them. And if one of her cubs dies, she'll most likely eat it immediately, as Khali did. This nourishes her and has the added benefit of removing the carcass. "That way there's nothing rotting in her den which might attract predators," Barthel says.

As reasonable as these decisions sound, there's still something profoundly upsetting about the deed—so much so that even biologists used to regard it as a pathological behavior. In some cases, depending on the circumstances, they still do.

Males Kill Babies Too

"Before the 1970s, any type of infanticide in animals was considered pathological," says Craig Stanford, a primatologist at the University of Southern California in Los Angeles. "Now, certain scenarios are recognized as part of an animal's reproductive strategy."

Male lions are one of the most cited examples of this type of infanticide. Typically, a pride of lions includes one or two adult males who father the cubs. If other males successfully oust these fathers, the newcomers almost immediately kill any young cubs, particularly those the female lions are nursing—despite every effort on the mothers' part to stop the slaughter. Then the females quickly become fertile again and mate with the very males who killed their cubs.

View Images A subadult male lion became protective of a cub, holding it in his mouth, after it was injured by adolescent males. PHOTOGRAPH BY BEVERLY JOUBERT, NATIONAL GEOGRAPHIC

From the newcomers' standpoint, "there's no sense in spending energy or resources raising the previous males' cubs," Stanford says, since the new males are most likely unrelated.

In the game of life, the prize goes to the individuals who have the most reproductive success and pass on the most genes—a task best accomplished by raising your own offspring or helping to raise those of your relatives. Assisting unrelated individuals adds nothing to your reproductive scorecard.

Human Animals Do It

This type of infanticide is found in almost every primate species, including chimpanzees, gorillas—and, as much as we would like to deny it, humans.

Male bonobos are one of the few great apes who have not been seen killing infants. This is probably because female bonobos are the dominant members of their societies, making it risky for the males to attack any youngsters. Also, bonobos happily mate with everyone in their community. Thus, males aren't readily able to identify which kids are theirs.

A common counter-reproductive strategy of females in many animal societies is to confuse males about which (if any) kids they've fathered. It doesn't always work.

Male bottlenose dolphins, for instance, remember which females they've mated with. When a male dolphin encounters a strange female with a young calf, he'll do his best to separate the pair and will then severely injure or kill the youngster by bashing it and heaving it through the air.

If the infant dies, the mother will become fertile in a few months—giving the killer male a chance to father her next calf. If the infant lives, the mother won't be receptive for another three to four years—a long time from a male's standpoint. In the game of life, it doesn't pay to wait for her to rear her kid, especially if you know it's not yours. Better to get rid of it.

Death at Los Angeles Zoo

Zoos generally try to prevent killings by males by carefully managing the reproductive events of the animals in their care. But sometimes animals behave in unpredictable ways.

That's what happened in 2012 when, as visitors looked on, an adult male chimpanzee bashed and killed his sister Gracie's three-month-old baby at the Los Angeles Zoo.

View Images Gracie sits with her baby in May 2012 at the Los Angeles Zoo. The female baby chimp was killed a month later by her uncle. PHOTOGRAPH BY LOS ANGELES ZOO, AP

The zookeepers had kept Gracie away from the rest of the troop for three months after she gave birth, giving her time to bond peacefully with her infant.

All seemed to be going well, and the keepers decided to slowly reintroduce the pair to their community. The other chimpanzees welcomed back the pair, and peered with curiosity at the new infant—the first baby chimp born at the zoo in 13 years.

But one day, without warning, Gracie's brother snatched the infant from her arms and dashed around the enclosure slamming her against the ground and walls. Despite Gracie's cries and protests, he wouldn't give back the now-dead baby, and it wasn't possible for the keepers to intervene.

"He used the baby for a big display, to show off," Stanford says. "It's impossible to explain why.

"It was very odd because the male was the mother's brother; the baby was his niece," Stanford adds. "It's not the usual scenario that happens in the wild, so it's difficult to explain. But as far as I can tell, it did not involve any mismanagement by the zoo. It wasn't caused by the chimpanzees being in captivity."

According to the rules of reproductive success, it would have made the most sense for Gracie's brother to protect his niece because they were related. If his niece grew up and had babies of her own, they would also carry some of his genetic legacy. His reproductive success would be enhanced.

Perhaps it wasn't intentional. Perhaps it was simply because he was a young male, prone to making exuberant displays, Stanford says.

The zoo's keepers and visitors were heartbroken. And the staff did its best to help Gracie by giving her the body of her baby to grieve over in a separate room.

"She recognizes that it's dead," a staff member told the press at the time of the incident, adding that Gracie spent a day and night sitting quietly beside her baby's body.

Baby Sloth Bear May Go Back to Mom

For sloth bear Khali's third cub, life is on an upswing. Her eyes were still tightly shut when the keepers took her from her mother, but they opened to the world on January 26. (The zoo has yet to name the cub.) She's been carried and cuddled and rocked in a rocking chair, with someone tending her 24 hours a day, bottle-feeding her at regular intervals.

"She's getting to be a handful," Barthel says. "She's full of energy and has a very strong mouth. We used to keep her in a sling and walk her from place to place, but she's too big for that now."

Normally, a newborn cub would ride on its mother's back for several months.

View Images Curator Tony Barthel plays with the sloth bear cub being hand-raised at the Smithsonian National Zoo. PHOTOGRAPH BY LINDA DAVIDSON, THE WASHINGTON POST VIA GETTY

The keepers are slowly reintroducing the cub to the other sloth bears, rearing her in the building with them so she can hear their sounds and smell their scents, and vice versa, and letting her explore the bears' indoor dens while they're outside.

Over the next few months, they'll let the adults see her, and if all goes well, they may even reintroduce her to Khali or to her father, Francoise.

"Ultimately, we hope to put her back with her mom," Barthel says. "It will be risky, but it's in the cub's best interest."

And at some point in the summer, the little cub who survived her mother's neglect will be introduced to the zoo's visitors.

Was Khali's behavior natural or pathological?

"In a case like that, it's impossible to say," Stanford says. "If the cubs were sick, then it's most likely a natural response. But that raises another question: How did the mother know they were sick?"