Clues emerging from DNA could unlock the mystery of human ancestors that are missing from the fossil record yet present in the genes of people living today.

Scientists found evidence years ago that our species, Homo sapiens, had interbred with now-extinct human relatives, including Neanderthals and Denisovans. But some lineages have been difficult to identify, because — unlike Neanderthals and Denisovans, whose DNA has been recovered from prehistoric remains — they are essentially genetic "ghosts," with no DNA proof of their existence to compare with the hints spotted in our genomes.

While previous studies have discovered remnants of the ghost lineages, they could not determine when the interbreeding happened or how far back these lineages diverged from the ancestors of modern humans.

Now, researchers have developed a new method to analyze modern human genomes and uncovered evidence of two previously unknown ancestral lineages by working backward from DNA in living people to reconstruct missing parts of the human family tree. One of the lineages appears to have interbred directly with Homo sapiens in Africa more than 50,000 years ago, while the other was an even older group that passed some of its DNA to humans indirectly through Denisovans. The researchers reported their findings July 30 in the journal Science.

The scientists' method reconstructs genealogies, or maps showing where different pieces of DNA came from and how they were passed down, revealing branches of our evolutionary past.

"The most fundamental question that most of us have is, 'Why are we here? Where do we come from?' And these genealogies really allow us to look into the past in a way that we have not been able to do before," said Priya Moorjani, study coauthor and an associate professor in the department of molecular and cell biology at the University of California, Berkeley.

Moorjani added that the discovery allows for further investigation into why some hominin groups survived while others disappeared. Understanding the genetic contributions of our various ancestors can help answer that question while also revealing how humans adapted to their environments and why certain diseases affect us today, she said.

Modern humans first moved out of Africa around 50,000 years ago. This migration of Homo sapiens is what led to interbreeding with the Neanderthals and Denisovans in Eurasia. However, the newly detected lineages add more to the story.

One of the unknown ghost ancestors described in the new study likely interbred with humans in Africa before the migration event. The researchers estimate that DNA inherited from this lineage makes up about 0.5% to 1% of the genomes of people living today — almost the same percentage as Neanderthal DNA currently found in many modern humans.

The second lineage is much older. The researchers refer to it as a "super-archaic" ancestor because it traces back to a branch of the human family tree that split roughly 1.8 million years ago. This hominin appears to have interbred with Denisovans in Eurasia more than 200,000 years ago, with some of its DNA eventually reaching modern humans through our interbreeding with Denisovans.

To uncover these ghost ancestors, researchers developed a new computer-based method, called TRACE, that can search contemporary human genomes for clues left by long-lost populations.

"Our genomes are mosaics of little bits of DNA from all our ancestors, and so in different parts of our genome we have a different family tree," Moorjani explained. Some branches of those family trees are relatively recent, while others extend much further into the past. DNA inherited from ancient relatives such as Neanderthals, for example, sits on these deeper branches. TRACE searches across the genome for far back lineages that could point to ancestry from previously unknown populations.

The researchers tested TRACE on more than 500 modern human genomes from current populations across Africa, Europe and Asia. They found traces of the more recent ghost ancestry in every population they studied, pointing to a lineage that must have contributed DNA to the ancestors of modern humans before our species' major migration out of Africa.

"If you think about going even beyond humans, gene flow and mixing across groups is pretty pervasive across all populations, and so it's not very surprising that we harbor DNA from different hominin groups," Moorjani said. "It's just that until recently, it's not been feasible to extract this DNA from people who lived in the past."

While the researchers cannot yet say which hominin populations these lineages belonged to, they've narrowed down possible candidates based on when the lineages diverged on the hominin family tree. One lineage's estimated time of divergence is consistent with Middle Pleistocene Homo populations in Africa, suggesting it could be Homo heidelbergensis, the researchers wrote in the study.

Homo heidelbergensis lived from about 700,000 to 200,000 years ago in Africa and Europe. The other much older lineage, the researchers speculate, could be related to Homo erectus from Eurasia. So far, DNA has not been recovered for either hominin group.

"The super-archaic finding is particularly exciting because it reveals genetic contributions from a human lineage that lived over a million years ago, despite the absence of any sequenced DNA from that population," said Arjun Biddanda, a postdoctoral researcher at Johns Hopkins University and a co-first author of the study, in a statement.

Modern human genomes are largely similar, but vary from individual to individual in small part due to these deep ancestral lineages, which have contributed some rare but noticeable differences to genomes, explained John Hawks, a paleoanthropologist and professor at the University of Wisconsin–Madison. Hawks was not involved with the new study.

"Today we have a tendency to focus on differences between people that seem large, but are actually superficial — like skin color or facial appearance," Hawks said in an email. "These differences among living people are actually very tiny compared to the ancestors we all evolved from, and those ancestors found ways to interact and survive with each other. That's our heritage, and it's one that matters even more than ever."

The discovery of the younger ghost lineage "places the time of mixture well before the mixture with Neanderthals, and shows that it affects all populations living today," Hawks added.

The researchers said they hope that the TRACE method will uncover more hidden lineages in our species as well as across other animal species. But the researchers agree that the best new evidence will come from DNA extracted directly from ancient fossils.

For now, however, the clues left in modern DNA are the closest scientists can get to these long-lost ancestors.

"Randomly, two people from the world might inherit the same piece of DNA from an ancestor who we didn't have an idea of before, but now we actually know," said the study's co-first author Yulin Zhang, a doctoral student of computational biology at UC Berkeley. "From this mysterious ancestor, we have something in common from another angle."

Taylor Nicioli is a freelance journalist based in New York.

Sign up for CNN's Wonder Theory science newsletter. Explore the universe with news on fascinating discoveries, scientific advancements and more.

For more CNN news and newsletters create an account at CNN.com