A battery of forensic chemical tests carried out on a mummy that dated from 3,700-3,500 BC revealed the recipe and confirmed that it was developed far earlier and used more widely than previously thought.
The Egyptian Museum in Turin, Italy, is now home to the mummy in question.
The findings are published in the Journal of Archaeological Science.
Dr Stephen Buckley, an archaeologist from the University of York, told BBC News that this mummy "literally embodies the embalming that was at the heart of Egyptian mummification for 4,000 years".
Dr Buckley and his colleagues worked out the chemical "fingerprint" of every ingredient, although each element could have come from a number of sources.
So the basic recipe was:
- a plant oil - possibly sesame oil;
- a "balsam-type" plant or root extract that may have come from bullrushes;
- a plant-based gum - a natural sugar that may have been extracted from acacia;
- crucially, a conifer tree resin, which was probably pine resin
When mixed into the oil, that resin would have given it antibacterial properties, protecting the body from decay.
"Until now," he said, "we've not had a prehistoric mummy that has actually demonstrated - so perfectly through the chemistry - the origins of what would become the iconic mummification that we know all about."
How did scientists find the recipe?
Dr Buckley began searching for the recipe several years ago when he and his team extracted and analysed the chemicals from Egyptian textiles that had been used to wrap mummies. The textiles are part of an Egyptian collection at Bolton Museum in the north of England.
Dating to around 4,000 BC, these particular fabrics were much older than the point at which it was believed that embalming and mummification originated. "Mummification in general supposedly started around 2,600 BC - when the Great Pyramid was being built," Dr Buckley said.
"But we observed that there was evidence that preservation of the body started earlier than this."
This discovery led the team to the prehistoric mummy in the Turin museum collection. It has never undergone any conservation treatments, so it provided a unique opportunity to study unpolluted ancient Egyptian chemistry.
Dr Jana Jones, Egyptologist and expert on ancient Egyptian burial practices from Macquarie University in Sydney, said: "The examination of the Turin body makes a momentous contribution to our limited knowledge of the prehistoric period and the expansion of early mummification practices as well as providing vital, new information on this particular mummy.
"By combining chemical analysis with visual examination of the body, genetic investigations, radiocarbon dating and microscopic analysis of the linen wrappings, we confirmed that this ritual mummification process took place around 3,600 BC on a male, aged between 20 and 30 years when he died."
Why does it matter?
The fact that this same recipe was used almost 2,000 years later to embalm the Pharaohs, Dr Buckley said, means "we have a sort of Pan-Egyptian identity well before the formation of the world's first nation state in 3,100 BC. Its origins are much earlier than we thought".
It also reveals an insight into how and when the Ancient Egyptians perfected an antibacterial embalming recipe that protected and preserved their dead - leaving behind the iconic Egyptian mummies we are now so familiar with.
Embalming was just one step in the careful process of preserving a body. The key steps of mummification were:
- Removal of the brain - possibly using a "whisking" process to cause the brain to liquefy
- Removal of the internal organs
- Putting the body into a natural salt to dry it out
- Coating the body in the embalming recipe to kill bacteria and to seal it
- Wrapping the body in linen
"It was the drying and the embalming recipe that were key to preservation," explained Dr Buckley.
"Egyptian mummification was at the heart of their culture."
He added: "The afterlife was just a continuation of enjoying life. But they needed the body to be preserved in order for the spirit to have a place to reside."
More about: mummy