When life gives you an ancient cave filled with dirt, look for DNA. That's what paleontologists and those involved in the study of ancient humans will likely be doing in the future following the revelation of a breakthrough technique that enables hominin DNA to be recovered directly from sediments without the need for fossils.

Led by geneticist Viviane Slon as well as molecular biologist Matthias Meyer (both from Germany's Max Planck Institute for Evolutionary Anthropology), the team is the first to extract Neanderthal and Denisovan DNA directly from dirt samples collected from archaeological caves in Europe where their existence has been documented. More interestingly, they were also able to recover DNA at sites where no bones were ever found.

All living things leave behind genetic traces of themselves as they go through life, and our ancient ancestors were no different. One of the advantages of using this "eDNA" (environmental DNA) to study ecosystems and the animals living in them is that all it requires is a water or soil sample.

Unsurprisingly, scientists have been applying this technique to prehistoric animals – evolutionary geneticist Eske Willersev made headlines back in 2003 when he became the first scientist to sequence the DNA from species such as woolly mammoths from Serbian permafrost. However this doesn't make the new findings any less of a feat given how difficult it is to isolate ancient human DNA. For a start, there's the fact that it exists in minuscule traces from decomposed bodies, blood or feces, which often get lost among the other biological material in the soil. Secondly, there's the difficulty of distinguishing it from modern human DNA, which inevitably ends up contaminating samples when researchers handle them.

Sure enough, while it wasn't a problem identifying the DNA of extinct animal species such as the woolly mammoth and woolly rhinoceros in the sediment samples that they collected, identifying ancient human DNA required a far greater degree of precision.

"From the preliminary results, we suspected that in most of our samples, DNA from other mammals was too abundant to detect small traces of human DNA," says Slon. "We then switched strategies and started targeting specifically DNA fragments of human origin."

As documented in their study, they developed a molecular probe based on modern human mitochondrial DNA – which was chosen due to its abundance – to extract similar sequences. The researchers then compared the samples they found to known variants associated with Neanderthals or Denisovans and checked for chemical damage consistent with ancient DNA to make sure that they were looking at the right genetic material.

To prevent modern human DNA from contaminating the sediments, archaeologists working at the El Sidrón cave in Spain, one of the sites in the study, also developed a protocol called "clean excavation" that enables researchers to extract both nuclear and mitochondrial DNA from teeth and skeletal remains for comparison purposes.

The result: Not only were the researchers able to detect the presence of ancient hominin DNA in the sediment samples from four caves, they were also able to distinguish between species and even deduce when a specific group might have occupied a cave.

"This work represents an enormous scientific breakthrough," explains paleontologist Antonio Rosas from the Natural Science Museum in Madrid, who was part of the study. "We can now tell which species of hominid occupied a cave and on which particular stratigraphic level, even when no bone or skeletal remains are present."

Case in point: The researchers found that the Denisovans and Neanderthals had occupied the Denisova Cave at different points in time based on the soil layer in which their DNA was found. "The Denisovans appear in the bottommost stratum, that is, in the oldest of the deposits," says Rosas. "Their DNA in this sediment, without being associated with any skeletal remains, is the oldest proof of their existence right now."

At the Trou Al'Wesse Cave in Belgium, while bones have never been found, Neanderthal stone tools have long hinted at their creators' existence. Thanks to this technique, the researchers were finally able to confirm that they had once occupied the site with the extraction of Neanderthal DNA from the sediments.

Given the results of the study, it's no wonder researchers such as Svante Pääbo, the esteemed evolutionary geneticist who was also involved in the study, say it could very well become a routine archaeological procedure for studying sites where no human remains have been found. And even in cases where there are hominin fossils, this technique could still be of use since it can extract DNA without causing any damage.

More importantly, this technique could help scientists fill in the gaps in our knowledge regarding our ancient ancestors: What routes did they take on their way to colonizing different parts of the world? How did different ancient human species co-exist? Though the findings have shed more light on the enigmatic Denisovans, they have also raised even more questions in turn. Their DNA was found in only one cave. However recent studies have shown their genes to be present in Tibetans and Sherpas, which could explain their ability to live in high-altitude environments. Did the Denisovans ever leave their cave and if so, where did they go?

"The technique could increase the sample size of the Neanderthal and Denisovan mitochondrial genomes, which until now were limited by the number of preserved remains," adds scientist Carles Lalueza-Fox from the Institute of Evolutionary Biology in Barcelona. "And it will probably be possible to even recover substantial parts of nuclear genomes."