There’s more than one way to mummify a corpse. Ancient Egyptians practiced perhaps the most well-known method: extracting organs, embalming the body and wrapping the remains in linens. But nature can make mummies too.

Such spontaneously preserved bodies can be of tremendous scientific importance, like “Oetzi the Iceman”, whose frozen remains were found in the Italian Alps or the Chinchorro cadavers that were buried in the Atacama Desert in northern Chile and safeguarded by the arid sand. These mummifications are made possible by environmental conditions that prevented human remains from naturally decaying.

“What you’re looking for is something extreme,” said David H. Thomas, an archaeologist with the American Museum of Natural History in New York City. “It has to be really dry, or really wet, or really frozen, or really high elevation.”

Bodies left in hot, arid environments can typically mummify in about two weeks, while the process typically takes a couple of months in enclosed locations. Remains in mild environments take about three months.

When a person dies the countdown to decomposition begins, as digestive enzymes start breaking down cells inside the body. When the person was alive these enzymes were held within parts of the cell known as the lysosomes. But when the person dies, the membranes of the lysosomes weaken, allowing the enzymes to spill out and digest the cell.

In most cases enzymes need to be in an aqueous environment to work, so if the fluids are removed, decomposition slows down. During spontaneous mummification, the body loses water more rapidly than the enzymes’ destructive actions can operate, according to Dario Piombino-Mascali, an Italian anthropologist and a visiting researcher at Vilnius University in Lithuania. Bodies buried in crypts can accidentally mummify if ventilation keeps them dry, as was the case in Lithuania’s Dominican Church of the Holy Spirit where Piombino-Mascali works.

Not every part of the body mummifies at the same time. Some internal organs, like the heart, take longer to dry out. The hands, toes and scrotum are among the fastest body parts to dry out.

The environment can speed up the desiccation process, often through extreme temperatures or pH levels that slow the enzyme activity. Sometimes the soil surrounding the body plays a big part as well either through osmosis or because heavy metals in the dirt can impede the enzymes. Even clothes can help mummification, according to Piombino-Mascali, because they can act as a wick that absorbs bodily fluids from the skin.

In addition to protecting the remains from the body’s process of decomposing, the environmental conditions also have to defend against external threats like bacteria, fungi and animals in order to ensure that a mummy will last. But if all of these conditions come together just right — and no curse has been placed upon the remains — scientists might one day uncover the mummy and learn valuable information about the era in which it lived.