A reconstruction of oral microflora genomes spanning a whopping 100,000-year period of human history may have revealed a surprising shift in the kinds of bacteria that like to call our mouths home.

Researchers from across Germany and the US teamed up to decode DNA extracted from the dental plaque of human and Neanderthal remains, using the sequences to recreate proteins once used by the bacteria.

It's a huge moment in the study of the microbes that humans harbor, giving us insights into bacteria that are no longer part of our body's personal ecosystem. In the future, these findings might even be used to develop novel drug treatments.

Tartar, or calcified dental plaque, is a perfect hiding place for microbes, which is the reason why your dentist stresses the importance of brushing and flossing daily. As good as it is at providing protection for bacteria, the researchers still only managed to extract very small pieces of DNA from the ancient samples to work from. That left a lot of scientific detective work to decipher the sequences.

"A typical bacterial genome is 3 million base pairs long, but time fragments the ancient DNA we recover to an average length of only about 30 to 50 base pairs," says anthropologist Christina Warinner from Harvard University in Massachusetts.

"In other words, each ancient bacterial genome is like a 60,000-piece jigsaw puzzle, and each piece of tooth tartar contains millions of genomes."

The researchers started with plaque from 12 Neanderthals (between 40,000 and 102,000 years old) and 34 humans (between 150 and 30,000 years old).

Previously, such genetic fragments would have been compared to the genomes of modern microbial species – a useful reference, but one that will never reveal species that are new or extinct.

In this case, the researchers refined a process known as the de novo assembly technique, where smaller scraps of DNA can be built up to a whole genome.

It's a bit like trying to put together a jigsaw with only some of the pieces, and no picture to work from. A variety of tricks, including identifying overlaps and patterns, are deployed to try and fill in the gaps – and after three years of careful comparison and analysis across all the samples, the bacterial genomes could be reconstructed.

From the genomes of notable quality, the researchers identified a shared sequence called biosynthetic gene clusters. Genes within these clusters play an important role in the construction of proteins inside the bacteria.

"This is how bacteria make really complicated and useful chemicals," says Warinner. "Almost all of our antimicrobials and a lot of our drug treatments ultimately derive from such bacterial biosynthetic gene clusters."

Transferring reconstructed DNA sequences into modern bacteria, the researchers successfully produced enzymes that were based on the ancient blueprints of microbes that once lived inside the mouths of our ancestors. One of these enzymes produced organic molecules known as furans, which today are involved in signaling between bacterial cells.

Based on a study of the genes to either side of the furan-producing enzyme, the researchers suspect this particular version could play a role in regulating bacterial photosynthesis.

In all, the greatest number of high-quality sequences seemed to belong to a genus of bacteria called Chlorobium. Capable of using light to oxidize sulfur for energy, these microbes aren't exactly the kinds of organisms we'd expect to be nestled up against our teeth.

It's possible they once lived in the human mouth, soaking up the few rays that happened to warm our tonsils any time we opened our mouths. Or they were a consequence of drinking pond water.

While we're not talking about bringing microbes back to life here – a bacteria version of Jurassic Park – the ancient genomes are useful in telling scientists how our microbiome might have changed and evolved over tens of thousands of years.

For example, there's the question of why these bacteria are no longer around in our mouths – perhaps due to a change in behavior or drinking habits – which is something future research could look at.

"Now we can scale up this process," says Warinner. "Suddenly, we can massively expand our understanding of the biochemical past."

The research has been published in Science.