For a large part of human prehistory, people around the world practised trepanation: a crude surgical procedure that involves forming a hole in the skull of a living person by either drilling, cutting or scraping away layers of bone with a sharp implement.
To date, thousands of skulls bearing signs of trepanation have been unearthed at archaeological sites across the world.
But despite its apparent importance, scientists are still not completely agreed on why our ancestors performed trepanation.
Anthropological accounts of 20th-Century trepanations in Africa and Polynesia suggest that, in these cases at least, trepanation was performed to treat pain – for instance, the pain caused by skull trauma or neurological disease.
Trepanation may also have had a similar purpose in prehistory. Many trepanned skulls show signs of cranial injuries or neurological diseases, often in the same region of the skull where the trepanation hole was made.
But as well as being used to treat medical conditions, researchers have long suspected that ancient humans performed trepanation for a quite different reason: ritual.
The earliest clear evidence of trepanation dates to approximately 7,000 years ago. It was practised in places as diverse as Ancient Greece, North and South America, Africa, Polynesia and the Far East. People probably developed the practice independently in several locations.
Archaeologists have turned up some of the best evidence for ritual trepanation ever discovered
Trepanation had been abandoned by most cultures by the end of the Middle Ages, but the practice was still being carried out in a few isolated parts of Africa and Polynesia until the early 1900s.
Since the very first scientific studies on trepanation were published in the 19th Century, scholars have continued to argue that ancient humans sometimes performed trepanation to allow the passage of spirits into or out of the body, or as part of an initiation rite.
However, convincing evidence is hard to come by. It is almost impossible to completely rule out the possibility that a trepanation was carried out for medical reasons, because some brain conditions leave no trace on the skull.
However, in a small corner of Russia archaeologists have turned up some of the best evidence for ritual trepanation ever discovered.
The story begins in 1997. Archaeologists were excavating a prehistoric burial site close to the city of Rostov-on-Don in the far south of Russia, near the northern reaches of the Black Sea.
The site contained the skeletal remains of 35 humans, distributed among 20 separate graves. Based on the style of the burials, the archaeologists knew that they dated to between approximately 5,000 and 3,000 BC, a period known as the Chalcolithic or "Copper Age".
Less than 1% of all recorded trepanations are located above the obelion point
One of the graves contained the skeletons of five adults – two women and three men – together with an infant aged between one and two years, and a girl in her mid-teens.
Finding multiple skeletons in the same prehistoric grave is not particularly unusual. But what had been done to their skulls was: the two women, two of the men and the teenage girl had all been trepanned.
Each of their skulls contained a single hole, several centimetres wide and roughly ellipsoidal in shape, with signs of scraping around the edges. The skull of the third man contained a depression which also showed evidence of having been carved, but not an actual hole. Only the infant's skull was unblemished.
The job of analysing the contents of the grave fell to Elena Batieva, an anthropologist now at the Southern Federal University in Rostov-on-Don, Russia. She immediately recognised the holes as trepanations, and she soon realised that these trepanations were unusual.
They had all been made in almost exactly the same location: a point on the skull called the "obelion". The obelion is on the top of the skull and towards the rear, roughly where a high ponytail might be gathered.
Opening the skull in this location would have risked major haemorrhage and death
Less than 1% of all recorded trepanations are located above the obelion point. What's more, Batieva knew that such trepanations were even less common in ancient Russia. As far as she was aware at the time, there was just one other recorded case of an obelion trepanation: a skull unearthed in 1974 at an archaeological site remarkably close to the one she was excavating.
Clearly, finding even one obelion trepanation is remarkable. But Batieva was looking at five, all of them buried in the same grave. This was, and is, unprecedented.
There is a good reason why obelion trepanation is uncommon: it is very dangerous.
The obelion point is located directly above the superior sagittal sinus, where blood from the brain collects before flowing into the brain's main outgoing veins. Opening the skull in this location would have risked major haemorrhage and death.
This suggests the Copper Age inhabitants of Russia must have had good reason to perform such trepanation procedures. Yet none of the skulls showed any signs of having suffered any injury or illness, before or after the trepanation had been performed.
Among the 137 skulls, they found nine with conspicuous holes
In other words, it appeared as if all of these people were trepanned while they were completely healthy. Was their trepanation evidence of some sort of ritual?
It was an intriguing possibility. However, Batieva had to give up the trail. She had many more skeletons to analyse from all over southern Russia, and could not afford to get sidetracked by just a few skulls, however enigmatic.
Before she gave up, Batieva decided to search through Russia's unpublished archaeological records, in case any more strange obelion trepanations had been discovered but not reported.
Surprisingly, she got two hits. The skulls of two young women with obelion trepanations had been discovered years earlier: one in 1980 and another in 1992. Each one had been unearthed less than 31 miles (50km) from Rostov-on-Don, and neither showed any signs of having been trepanned for a medical reason.
This gave Batieva a grand total of eight unusual skulls, all clustered in a small region of southern Russia and potentially all of about the same age. A decade later, even more came to light.
In 2011, an international team of archaeologists was analysing 137 human skeletons. They had recently been excavated from three separate Copper Age burial sites around 310 miles (500km) south-east of Rostov-on-Don, in the Stavropol Krai region of Russia, close to the modern-day border with Georgia.
The archaeologists had not set out to discover trepanations. They were there to learn about the general health of the prehistoric inhabitants of the region. But among the 137 skulls, they found nine with conspicuous holes.
Southern Russia may have been a centre for ritual trepanation
Five of them were standard examples of trepanation. The holes had been made in a variety of different locations around the front and side of the skull, and all of the skulls showed signs of having suffered a physical trauma, suggesting that the trepanations had been performed to treat the effects of the injuries.
But none of the other four trepanned skulls showed any signs of damage or disease. What's more, all four had been trepanned exactly above the obelion point.
Quite by chance one of the researchers – Julia Gresky, an anthropologist at the German Archaeological Institute (DAI) – had already read Batieva's paper describing the unusual trepanations from the Rostov-on-Don region.
Now Gresky, Batieva and other archaeologists have teamed up to describe all 12 of the obelion trepanations from Southern Russia. Their study was published in April 2016 in the American Journal of Physical Anthropology.
The 12 skulls would have been remarkable discoveries wherever they had been found. But the fact that they were all discovered in the same tiny corner of Russia meant that a connection seemed likely. If there was no link, the odds that a batch of such rare trepanations would turn up exclusively in southern Russia would have been exceedingly low.
Gresky, Bateiva and their colleagues argue that, while this idea is difficult to prove, the clustering of these unusual trepanations suggests that southern Russia may have been a centre for ritual trepanation.
The owners of the other skulls seem to have survived their operations
Maria Mednikova of the Russian Academy of Sciences in Moscow is an expert on Russian trepanation. She believes that trepanations in specific, dangerous areas of the cranium may have been performed to achieve "transformations" of some kind. She suggests that, by trepanning in these places, people thought they could acquire unique skills that ordinary members of society did not have.
We can only speculate as to why these 12 apparently healthy people were trepanned in such an unusual and dangerous way. But thanks to the trepanation holes themselves, we can infer a surprising amount about the fate of the people after they received their trepanation.
One of the 12 skulls belonged to a woman under the age of 25, who had been buried at one of the sites near Rostov-on-Don. It showed no signs of healing, suggesting that she died during her trepanation or shortly afterwards.
However, the owners of the other skulls seem to have survived their operations. Their skulls showed bone healing around the edges of the trepanation holes – although the bone never completely re-grew over the holes.
Three of the 12 skulls showed only slight signs of healing around the trepanation hole, suggesting that their owners only survived between two and eight weeks after the operation. Two of these individuals were women between 20 and 35 years of age. The third was an elderly person between 50 and 70 years old, whose sex could not be determined.
The other eight skulls showed more advanced healing. Based on what we know about bone healing today, these individuals probably survived for at least four years after their operations.
It appeared as if all of these people were trepanned while they were completely healthy
These eight survivors included all five of the people from the mass grave near Rostov-on-Don, whose bizarrely-trepanned skulls first attracted Batieva's attention almost 20 years ago.
The two men, two women and one adolescent girl had all survived with their obelion holes for years. The girl, who based on her skeleton was between 14 and 16 years old, must have been trepanned when she was no older than 12, and possibly much younger.
It is still possible that these 12 people were suffering from diseases or head injuries. In that case, the trepanning operation may have worked for at least eight of them.
But it is also possible that Batieva and her colleagues are right, and these people were trepanned for a ritual purpose. If that is true, we can only guess at what benefits they received – or believed they had received – throughout the rest of their lives.
Join over five million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.
If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.