"It might take a little bit of force to break this up," says mortician Holly Williams, lifting John's arm and gently bending it at the fingers, elbow and wrist. "Usually, the fresher a body is, the easier it is for me to work on."

Williams speaks softly and has a happy-go-lucky demeanour that belies the nature of her work. Raised and now employed at a family-run funeral home in north Texas, she has seen and handled dead bodies on an almost daily basis since childhood.

Now 28 years old, she estimates that she has worked on something like 1,000 bodies. Her work involves collecting recently deceased bodies from the Dallas–Fort Worth area and preparing them for their funeral.

"Most of the people we pick up die in nursing homes," says Williams, "but sometimes we get people who died of gunshot wounds or in a car wreck."

"We might get a call to pick up someone who died alone and wasn't found for days or weeks, and they'll already be decomposing, which makes my work much harder."

John had been dead about four hours before his body was brought into the funeral home. He had been relatively healthy for most of his life. He had worked his whole life on the Texas oil fields, a job that kept him physically active and in pretty good shape.

He had stopped smoking decades earlier and drank alcohol moderately. Then, one cold January morning, he suffered a massive heart attack at home (apparently triggered by other, unknown, complications), fell to the floor, and died almost immediately. He was just 57 years old.

Now, John lay on Williams' metal table, his body wrapped in a white linen sheet, cold and stiff to the touch, his skin purplish-grey – telltale signs that the early stages of decomposition were well under way.

Self-digestion

Far from being 'dead', a rotting corpse is teeming with life. A growing number of scientists view a rotting corpse as the cornerstone of a vast and complex ecosystem, which emerges soon after death and flourishes and evolves as decomposition proceeds.

Decomposition begins several minutes after death with a process called autolysis, or self-digestion. Soon after the heart stops beating, cells become deprived of oxygen, and their acidity increases as the toxic by-products of chemical reactions begin to accumulate inside them.

Enzymes start to digest cell membranes and then leak out as the cells break down. This usually begins in the liver, which is rich in enzymes, and in the brain, which has a high water content.

Eventually, though, all other tissues and organs begin to break down in this way. Damaged blood cells begin to spill out of broken vessels and, aided by gravity, settle in the capillaries and small veins, discolouring the skin.

Body temperature also begins to drop, until it has acclimatised to its surroundings. Then, rigor mortis – 'the stiffness of death' – sets in, starting in the eyelids, jaw and neck muscles, before working its way into the trunk and then the limbs.

In life, muscle cells contract and relax due to the actions of two filamentous proteins (actin and myosin), which slide along each other. After death, the cells are depleted of their energy source and the protein filaments become locked in place.

This causes the muscles to become rigid and locks the joints.

During these early stages, the cadaveric ecosystem consists mostly of the bacteria that live in and on the living human body.

Our bodies host huge numbers of bacteria; every one of the body's surfaces and corners provides a habitat for a specialised microbial community.

By far the largest of these communities resides in the gut, which is home to trillions of bacteria of hundreds or perhaps thousands of different species.

The gut microbiome is one of the hottest research topics in biology; it's been linked to roles in human health and a plethora of conditions and diseases, from autism and depression to irritable bowel syndrome and obesity.

But we still know little about these microbial passengers. We know even less about what happens to them when we die.

In August 2014, forensic scientist Gulnaz Javan of Alabama State University in Montgomery and her colleagues published the very first study of what they have called the thanatomicrobiome (from thanatos, the Greek word for "death").

"Many of our samples come from criminal cases," says Javan.

"Someone dies by suicide, homicide, drug overdose or traffic accident, and I collect tissue samples from the body. There are ethical issues [because] we need consent."

Most internal organs are devoid of microbes when we are alive. Soon after death, however, the immune system stops working, leaving them to spread throughout the body freely. This usually begins in the gut, at the junction between the small and large intestines.

Left unchecked, our gut bacteria begin to digest the intestines – and then the surrounding tissues – from the inside out, using the chemical cocktail that leaks out of damaged cells as a food source.

Then they invade the capillaries of the digestive system and lymph nodes, spreading first to the liver and spleen, then into the heart and brain.

Javan and her team took samples of liver, spleen, brain, heart and blood from 11 cadavers, at between 20 and 240 hours after death.

They used two different state-of-the-art DNA sequencing technologies, combined with bioinformatics, to analyse and compare the bacterial content of each sample.

The samples taken from different organs in the same cadaver were very similar to each other but very different from those taken from the same organs in the other bodies.

This may be due partly to differences in the composition of the microbiome of each cadaver, or it might be caused by differences in the time elapsed since death.

An earlier study of decomposing mice revealed that although the microbiome changes dramatically after death, it does so in a consistent and measurable way. The researchers were able to estimate time of death to within three days of a nearly two-month period.

Javan's study suggests that this 'microbial clock' may be ticking within the decomposing human body, too. It showed that the bacteria reached the liver about 20 hours after death and that it took them at least 58 hours to spread to all the organs from which samples were taken.

Thus, after we die, our bacteria may spread through the body in a systematic way, and the timing with which they infiltrate first one internal organ and then another may provide a new way of estimating the amount of time that has elapsed since death.

"Degree of decomposition varies not only from individual to individual but also differs in different body organs," says Javan.

"Spleen, intestine, stomach and pregnant uterus are earlier to decay, but on the other hand kidney, heart and bones are later in the process."

In 2014, Javan and her colleagues secured a US$200,000 grant from the US National Science Foundation to investigate further.

"We will do next-generation sequencing and bioinformatics to see which organ is best for estimating [time of death] – that's still unclear," she says.

One thing that does seem clear, however, is that a different composition of bacteria is associated with different stages of decomposition.

Putrefaction

Scattered among the pine trees in Huntsville, Texas, lie around half a dozen human cadavers in various stages of decay.

The two most recently placed bodies are spread-eagled near the centre of the small enclosure with much of their loose, grey-blue mottled skin still intact, their ribcages and pelvic bones visible between slowly putrefying flesh.

A few metres away lies another, fully skeletonised, with its black, hardened skin clinging to the bones, as if it were wearing a shiny latex suit and skullcap.

Further still, beyond other skeletal remains scattered by vultures, lies a third body within a wood and wire cage. It is nearing the end of the death cycle, partly mummified. Several large, brown mushrooms grow from where an abdomen once was.

For most of us the sight of a rotting corpse is at best unsettling and at worst repulsive and frightening, the stuff of nightmares. But this is everyday for the folks at the Southeast Texas Applied Forensic Science Facility.

Opened in 2009, the facility is located within a 247-acre area of National Forest owned by Sam Houston State University (SHSU).

Within it, a 9-acre plot of densely wooded land has been sealed off from the wider area and further subdivided, by 10-foot-high (3 metres high) green wire fences topped with barbed wire.

In late 2011, SHSU researchers Sibyl Bucheli and Aaron Lynne and their colleagues placed two fresh cadavers here, and left them to decay under natural conditions.

Once self-digestion is under way and bacteria have started to escape from the gastrointestinal tract, putrefaction begins. This is molecular death – the breakdown of soft tissues even further, into gases, liquids and salts.

It is already under way at the earlier stages of decomposition but really gets going when anaerobic bacteria get in on the act.

Putrefaction is associated with a marked shift from aerobic bacterial species, which require oxygen to grow, to anaerobic ones, which do not.

These then feed on the body's tissues, fermenting the sugars in them to produce gaseous by-products such as methane, hydrogen sulphide and ammonia, which accumulate within the body, inflating (or 'bloating') the abdomen and sometimes other body parts.

This causes further discolouration of the body. As damaged blood cells continue to leak from disintegrating vessels, anaerobic bacteria convert haemoglobin molecules, which once carried oxygen around the body, into sulfhaemoglobin.

The presence of this molecule in settled blood gives skin the marbled, greenish-black appearance characteristic of a body undergoing active decomposition.

Bloating is often used as a marker for the transition between early and later stages of decomposition, and another recent study shows that this transition is characterised by a distinct shift in the composition of cadaveric bacteria.

Bucheli and Lynne took samples of bacteria from various parts of the bodies at the beginning and the end of the bloat stage. They then extracted bacterial DNA from the samples and sequenced it.

As an entomologist, Bucheli is mainly interested in the insects that colonise cadavers. She regards a cadaver as a specialised habitat for various necrophagous (or "dead-eating") insect species, some of which see out their entire life cycle in, on and around the body.

Colonisation

When a decomposing body starts to purge, it becomes fully exposed to its surroundings. At this stage, the cadaveric ecosystem really comes into its own: a 'hub' for microbes, insects and scavengers.

Two species closely linked with decomposition are blowflies and flesh flies (and their larvae). Cadavers give off a foul, sickly-sweet odour, made up of a complex cocktail of volatile compounds that changes as decomposition progresses.

Blowflies detect the smell using specialised receptors on their antennae, then land on the cadaver and lay their eggs in orifices and open wounds.

Each fly deposits around 250 eggs that hatch within 24 hours, giving rise to small first-stage maggots. These feed on the rotting flesh and then moult into larger maggots, which feed for several hours before moulting again.

After feeding some more, these yet larger, and now fattened, maggots wriggle away from the body. They then pupate and transform into adult flies, and the cycle repeats until there's nothing left for them to feed on.

Under the right conditions, an actively decaying body will have large numbers of stage-three maggots feeding on it. This 'maggot mass' generates a lot of heat, raising the inside temperature by more than 10°C (18°F).

Like penguins huddling in the South Pole, individual maggots within the mass are constantly on the move. But whereas penguins huddle to keep warm, maggots in the mass move around to stay cool.

"It's a double-edged sword," Bucheli explains, surrounded by large toy insects and a collection of Monster High dolls in her SHSU office.

"If you're always at the edge, you might get eaten by a bird, and if you're always in the centre, you might get cooked. So they're constantly moving from the centre to the edges and back."

The presence of flies attracts predators such as skin beetles, mites, ants, wasps and spiders, which then feed on or parasitise the flies' eggs and larvae. Vultures and other scavengers, as well as other large meat-eating animals, may also descend upon the body.

In the absence of scavengers, though, the maggots are responsible for removal of the soft tissues. As Carl Linnaeus (who devised the system by which scientists name species) noted in 1767, "three flies could consume a horse cadaver as rapidly as a lion".

Third-stage maggots will move away from a cadaver in large numbers, often following the same route. Their activity is so rigorous that their migration paths may be seen after decomposition is finished, as deep furrows in the soil emanating from the cadaver.

Every species that visits a cadaver has a unique repertoire of gut microbes, and different types of soil are likely to harbour distinct bacterial communities – the composition of which is probably determined by factors such as temperature, moisture, and the soil type and texture.

All these microbes mingle and mix within the cadaveric ecosystem. Flies that land on the cadaver will not only deposit their eggs on it, but will also take up some of the bacteria they find there and leave some of their own.

And the liquefied tissues seeping out of the body allow the exchange of bacteria between the cadaver and the soil beneath.

When they take samples from cadavers, Bucheli and Lynne detect bacteria originating from the skin on the body and from the flies and scavengers that visit it, as well as from soil.

"When a body purges, the gut bacteria start to come out, and we see a greater proportion of them outside the body," says Lynne.

Thus, every dead body is likely to have a unique microbiological signature, and this signature may change with time according to the exact conditions of the death scene.

A better understanding of the composition of these bacterial communities, the relationships between them and how they influence each other as decomposition proceeds could one day help forensics teams learn more about where, when and how a person died.

For instance, detecting DNA sequences known to be unique to a particular organism or soil type in a cadaver could help crime scene investigators link the body of a murder victim to a particular geographical location or narrow down their search for clues even further, perhaps to a specific field within a given area.

"There have been several court cases where forensic entomology has really stood up and provided important pieces of the puzzle," says Bucheli, adding that she hopes bacteria might provide additional information and could become another tool to refine time-of-death estimates.

"I hope that in about five years we can start using bacterial data in trials," she says.

To this end, researchers are busy cataloguing the bacterial species in and on the human body, and studying how bacterial populations differ between individuals.

"I would love to have a dataset from life to death," says Bucheli. "I would love to meet a donor who'd let me take bacterial samples while they're alive, through their death process and while they decompose."

Purging

"We're looking at the purging fluid that comes out of decomposing bodies," says Daniel Wescott, director of the Forensic Anthropology Centre at Texas State University in San Marcos.

Wescott, an anthropologist specialising in skull structure, is using a micro-CT scanner to analyse the microscopic structure of the bones brought back from the body farm.

He also collaborates with entomologists and microbiologists – including Javan, who has been busy analysing samples of cadaver soil collected from the San Marcos facility – as well as computer engineers and a pilot, who operate a drone that takes aerial photographs of the facility.

"I was reading an article about drones flying over crop fields, looking at which ones would be best to plant in," he says.

"They were looking at near-infrared, and organically rich soils were a darker colour than the others. I thought if they can do that, then maybe we can pick up these little circles."

Those "little circles" are cadaver decomposition islands. A decomposing body significantly alters the chemistry of the soil beneath it, causing changes that may persist for years.

Purging – the seeping of broken-down materials out of what's left of the body – releases nutrients into the underlying soil, and maggot migration transfers much of the energy in a body to the wider environment.

Eventually, the whole process creates a 'cadaver decomposition island', a highly concentrated area of organically rich soil. As well as releasing nutrients into the wider ecosystem, this attracts other organic materials, such as dead insects and faecal matter from larger animals.

According to one estimate, an average human body consists of 50 to 75 percent water, and every kilogram of dry body mass eventually releases 32 grams of nitrogen, 10 grams of phosphorous, 4 grams of potassium and 1 gram of magnesium into the soil.

Initially, it kills off some of the underlying and surrounding vegetation, possibly because of nitrogen toxicity or because of antibiotics found in the body, which are secreted by insect larvae as they feed on the flesh.

Ultimately, though, decomposition is beneficial for the surrounding ecosystem.

The microbial biomass within the cadaver decomposition island is greater than in other nearby areas. Nematode worms, associated with decay and drawn to the seeping nutrients, become more abundant, and plant life becomes more diverse.

Further research into how decomposing bodies alter the ecology of their surroundings may provide a new way of finding murder victims whose bodies have been buried in shallow graves.

Grave soil analysis may also provide another possible way of estimating time of death.

A 2008 study of the biochemical changes that take place in a cadaver decomposition island showed that the soil concentration of lipid-phosphorous leaking from a cadaver peaks at around 40 days after death, whereas those of nitrogen and extractable phosphorous peak at 72 and 100 days, respectively.

With a more detailed understanding of these processes, analyses of grave soil biochemistry could one day help forensic researchers to estimate how long ago a body was placed in a hidden grave.

Burial

In the relentless dry heat of a Texan summer, a body left to the elements will mummify rather than decompose fully. The skin will quickly lose all of its moisture, so that it remains clinging to the bones when the process is complete.

The speed of the chemical reactions involved doubles with every 10°C rise in temperature, so a cadaver will reach an advanced stage of decomposition after 16 days at an average daily temperature of 25°C.

By then, most of the flesh has been removed from the body, and so the mass migration of maggots away from the carcass can begin.

The ancient Egyptians learned inadvertently how the environment affects decomposition. In the predynastic period, before they started building elaborate coffins and tombs, they wrapped their dead in linen and buried them directly in the sand.

The heat inhibited the activity of microbes, while burial prevented insects from reaching the bodies, and so they were extremely well preserved.

Later on, they began building elaborate tombs for the dead, in order to provide even better for their afterlife, but this had the opposite of the intended effect –separating the body from the sand actually hastened decomposition. And so they invented embalming and mummification.

Embalming involves treating the body with chemicals that slow down the decomposition process.

The ancient Egyptian embalmer would first wash the body of the deceased with palm wine and Nile water, remove most of the internal organs through an incision made down the left-hand side, and pack it with natron (a naturally-occurring salt mixture found throughout the Nile Valley).

He would use a long hook to pull the brain out through the nostrils, then cover the entire body with natron and leave it to dry for 40 days. Initially, the dried organs were placed into canopic jars that were buried alongside the body; later, they were wrapped in linen and returned to the body.

Finally, the body itself was wrapped in multiple layers of linen, in preparation for burial. Morticians study the ancient Egyptian embalming method to this day.

Back at the funeral home, Holly Williams performs something similar so that family and friends can view their departed loved one at the funeral as they once were, rather than as they now are. For victims of trauma and violent deaths, this can involve extensive facial reconstruction.

Living in a small town, Williams has worked on many people she knew or grew up with – friends who overdosed, committed suicide or died texting at the wheel.

When her mother died four years ago, Williams did some work on her, too, adding the final touches by making up her face: "I always did her hair and make-up when she was alive, so I knew how to do it just right."

She transfers John to the prep table, removes his clothes and positions him, then takes several small bottles of embalming fluid from a wall cupboard.

The fluid contains a mixture of formaldehyde, methanol and other solvents; it temporarily preserves the body's tissues by linking cellular proteins to each other and 'fixing' them into place. The fluid kills bacteria and prevents them from breaking down the proteins and using them as a food source.

Williams pours the bottles' contents into the embalming machine. The fluid comes in an array of colours, each matching a different skin tone. Williams wipes his body with a wet sponge and makes a diagonal incision just above his left collarbone.

She 'raises' the carotid artery and subclavian vein from the neck, ties them off with pieces of string, then pushes a cannula (thin tube) into the artery and small tweezers into the vein to open up the vessels.

Next, she switches the machine on, pumping embalming fluid into the carotid artery and around John's body. As the fluid goes in, blood pours out of the incision, flowing down along the guttered edges of the sloped metal table and into a large sink.

Meanwhile, she picks up one of his limbs to massage it gently. "It takes about an hour to remove all the blood from an average-sized person and replace it with embalming fluid," Williams says.

"Blood clots can slow it down, so massaging breaks them up and helps the flow of the embalming fluid."

Once all the blood has been replaced, she pushes an aspirator into John's abdomen and sucks the fluids out of the body cavity, together with any urine and faeces that might still be in there.

Finally, she sews up the incisions, wipes the body down a second time, sets the facial features and re-dresses it. John is now ready for his funeral.

Embalmed bodies do eventually decompose. Exactly when, and how long it takes, depends largely on how the embalming was done, the type of casket in which the body is placed and how it is buried.

Bodies are, after all, merely forms of energy, trapped in lumps of matter waiting to be released into the wider Universe.

According to the laws of thermodynamics, energy cannot be created or destroyed, only converted from one form to another. In other words: things fall apart, converting their mass to energy while doing so.

Decomposition is one final, morbid reminder that all matter in the universe must follow these fundamental laws. It breaks us down, equilibrating our bodily matter with its surroundings, and recycling it so that other living things can put it to use.

Ashes to ashes, dust to dust.

This article first appeared on Mosaic and is republished here under a Creative Commons licence.