How did gods evolve? I can’t promise to answer a question of such gravity this week, but I can perhaps raise some interesting ideas.

Note that I’m not specifically referring to the Christian, Islamic or Judean deity — I’m speaking more broadly about the roots of our belief in a higher power.

Some scientists believe religion has evolved over time. It’s similar, they say, to the way in which giraffes acquired long necks or mammals produced milk for their offspring — it’s a trait that has helped humanity to survive. If that’s the case with religion, then it probably evolved in stages over time. Ancestors of modern giraffes, for example, had shorter necks, while primitive mammals produced a liquid far less nutritious than milk.

A wide variety of religious beliefs can be found in all human cultures. And yet, for a long time scientists didn’t have a clear idea of how such beliefs might have evolved in our distant ancestors.

Recently, however, biologists working in Guinea appear to have found evidence of an odd ritual performed by chimpanzees. This isn’t to suggest the scientists might have found a chimpanzee god or anything, but they have detected a behavior that could form the basis for belief, superstition and even faith.

Laura Kehoe, a Ph.D. student at the Humboldt University of Berlin, has been studying the influence of agriculture on biodiversity. She had noticed that some of the trees in the area she was covering had some unusual scratches and markings.

She set up some cameras around the trees and waited. Upon reviewing the video footage, she was astounded to see chimpanzees coming to the trees and, er, worshipping them. Well … that’s perhaps going a bit too far. Nevertheless, the chimpanzees did bring stones to the trees and place them in hollow sections in the trunk. They also bashed the trees with rocks.

“Maybe we found the first evidence of chimpanzees creating a kind of shrine that could indicate sacred trees,” Kehoe wrote in the journal Scientific Reports.

We have long had a natural and completely understandable fascination with our fellow apes, especially chimpanzees and bonobos, our closest relatives. When primatologist Jane Goodall discovered in the 1960s that chimpanzees use tools, it caused a worldwide sensation.

Ever since, discoveries about the behavior and intelligence of orangutans, chimpanzees, bonobos and gorillas have gradually chipped away at the traits we once considered to be uniquely human.

It could even be argued that there’s nothing uniquely human about us anymore, only that we are able to perform tasks better. Sure, chimpanzees can use rocks to break nuts but I’d like to see them build a car.

Chimpanzees have also exhibited ritual behavior that is difficult to explain. Some actions are horrific. I remember a case in which biologists witnessed the killing of an adult male chimpanzee. The dead male had been horribly mutilated: the chimpanzee’s face had been battered, its throat gouged and it had been disembowled.

If that wasn’t violent enough in human terms, biologists also found that the chimpanzees sexual organs had been ripped off and discarded 30 meters away from the body. The biologists speculated that the victim had been deliberately emasculated as part of some ritual.

Other less disturbing examples of ritual behaviors include chimpanzees performing strange dances in the middle of a rainstorm or as a bushfire approaches (when all other animals are fleeing for their lives).

What does all this really mean? Well, it’s hard to tell. I asked Kehoe whether scientists could devise a test to understand such ritual behaviors better.

“We could develop an experimental set-up that might be able to test the hypothesis,” she says, “but it would be premature.”

Indeed, Kehoe believes that it’s better to protect endangered animals before trying to understand their behavior.

“We first need to secure these chimps’ survival in the wild,” she says. “It’s a fascinating behavior that we have no chance of figuring out unless we make drastic changes and prioritize nature.”

OK, I was chastened — we can’t allow the population of these animals, our closest relatives, to be killed off.

Poaching, disease and habitat destruction has already taken a terrible toll on chimpanzee populations worldwide. While scientists believe about 2 million chimpanzees once roamed the planet, current estimates put their number somewhere between 150,000 and 300,000.

I’m hopeful the Humboldt team’s discovery will, in some way, help to ensure that chimpanzees will be protected.

Rowan Hooper is the news editor of New Scientist magazine. The second volume of Natural Selections columns translated into Japanese has been published by Shinchosha. The title is “Hito wa Ima mo Shinka Shiteru” (“The Evolving Human”). Follow Rowan on Twitter @rowhoop.