When chimpanzee mothers are about to have a baby, they tend to travel away from their group for a while and lie low in a safe, secret place to give birth.

After witnessing a harrowing case in which a male chimp snatched away an infant seconds after its birth and cannibalised it, researchers think that chimp mothers might be hiding away to prevent the deaths of their newborn babies.

Researchers Hitonaru Nishie and Michio Nakamura from Kyoto University recently reported on the first-ever observed case when a wild chimpanzee baby is grabbed and eaten by an adult male of the same group.

While that sounds absolutely horrifying, the gruesome details of the case have actually helped scientists shed new light on the parenting behaviours and sexual competition of wild chimpanzees.

It's extremely rare for scientists to catch a glimpse of a wild chimp mum giving birth, and primatologists know that expecting mums tend to isolate themselves from their group.

So the team was quite surprised when one rainy December morning in 2014, one of the females in the group they'd been observing suddenly gave birth while hanging out with a party of 20 other chimps.

The female, named Devota, had been a part of this group for two years at that point; the scientists hadn't even noticed any warning signs that she was expecting, and saw none of the tell-tale signs that she was about to give birth.

Unfortunately, the situation quickly turned from surprise to shock, as a dominant male named Darwin immediately snatched the newborn from the ground and rushed away before Devota could even touch it.

"The entire incident occurred very rapidly; therefore, we could not confirm whether a live-birth or stillbirth had occurred or even the sex of the infant," the team writes in their study.

It only got worse from there. Half an hour later Darwin emerged from the bushes, holding the infant. Working in rainy and badly lit conditions, Nishie managed to snap a few photos, before the male rushed off again.

darwin and devotas dead babyNishie & Nakamura, Am J Phys Anthropol (2017)

When the researchers located him in a nearby tree some 15 minutes later, the male had already started eating the infant's body, starting from the legs.

Over the next hour, the team saw a few other chimps picking up and eating bits that had fallen on the ground under the tree, and soon enough Darwin was done with his grisly meal.

"On December 3, the following day, we located Darwin at 11:30am and followed him throughout the day. As Darwin had severe diarrhoea, we could not locate any bones or hairs of the infant in his faeces," the researchers write.

So maybe his stomach didn't agree that well with the eating of one of his kin.

The team witnessed these events while they were studying a large group of chimps living in the Mahale mountains near Lake Tanganyika in Tanzania. Labelled simply as the 'M group', this band of chimps has been continuously studied by different researchers since 1968.

You won't be cheered up by the fact that primate males in many species readily kill unrelated infants. This is due to competition - killing an infant that's not their own means the female will be ready sooner for another mating attempt, heightening the male's chances to sire offspring with her.

But while both 'infanticide' and cannibalism in chimps has been documented before, this is the first time scientists have seen a baby snatched immediately after delivery.

"We argue that the rarity of similar observations to this case is largely because of the rare chance to observe delivery among wild chimpanzees," the team writes.

They hypothesise that this case shows why chimp mums go on their secret maternity leave - to protect their newborns from murders that might be much more common than we know.

Why did Devota give birth so suddenly? The team thinks it's possible that as a first time mum she hadn't yet learned the strategy for going away, or maybe the infant's father was actually nearby so she didn't perceive the danger.

But before you get too sad about this story, the M group in Mahale is not just a bunch of murderous monsters. Just last year, Nakamura and his team also reported they'd witnessed the group looking after a disabled baby chimp.

We're sure our primate cousins will continue to surprise us in the future, too.

The study was published in The American Journal of Physical Anthropology.

Update 17 October 2017: An earlier version of this article feature an image of baboons. The image has been updated to show chimpanzees.