Wild chimpanzees drinking wine from palm trees have helped shed light on a theory about evolution, scientists have said.

Chimps in the west African country of Guinea discovered a treat in raffia palms that local people tap to extract a sweet, milky sap that ferments into an alcoholic drink.

The apes scrunch up leaves in their mouths, moulding them into spongy pads that they dip into the sap-gathering container, which villagers attach to the tree near its crown.

Tests showed that the beverage's alcoholic content varied from 3.1% to 6.9%, the equivalent of strong beer.

Some of the chimps went a little ape.

"[They] consumed significant quantities of ethanol [alcohol] and displayed behavioural signs of inebriation," the scientific paper said.

"Researchers rarely collected detailed behavioural data before versus after exposure to ethanol, but some drinkers rested directly after imbibing fermented sap."

The chimps are part of a closely-observed colony at Bossou in southern Guinea.

In 2008, one of the animals made the headlines when he was found to use a stick to "fish" for ants, an important discovery in the use of tools by our primate cousins.

Cases of animals ingesting alcohol are not exceptional. They include Swedish moose that get drunk on fermented apples, and monkeys on the Caribbean island of St Kitts that sneak gulps from holiday-makers' cocktails.

But the Bossou chimps, observed over 17 years, are the first to provide serious data about how much alcohol can be consumed in the wild.

At times, just one chimp would go to the top of the palm tree, the researchers found.

But on other occasions, there would be "drinking sessions" when several chimps would gather in the crown of the tree.

"Individuals either co-drank, with drinkers alternating dips of their leaf-sponges into the fermented palm sap, or one individual monopolised the container, whereas others waited their turn."

Over the 17 years, the researchers recorded 51 drinking events, 20 of which were "drinking sessions." They identified 13 adult and young chimps.

The animals made their sponges from leaves that villages had placed over the top of the containers to prevent dust and insects from contaminating the sap.

The findings back the so-called "drunken monkey" theory, that apes and humans share a genetic ability to break down alcohol that was handed down from a common ancestor.

By metabolising alcohol, according to this idea, our ancestors could eat fermented fruit found on the forest floor, gaining a precious additional source of calories and vitamins.

The study, headed by Kimberley Hockings of Oxford Brookes University in southern England, appears in the British journal Royal Society Open Science.