Almost seven centuries ago, London was devastated by an apocalyptic plague that swept across Asia and continental Europe. Today, scientists are cracking the genome code for the disease using human teeth from skeletons excavated in the city.

LONDON -- They were the final resting place for victims of the Black Death, but London’s underground medieval plague pits are now unlocking the secrets of modern-day infectious diseases.

The bodies of tens of thousands of Londoners were thrown into communal graves after one of the most devastating epidemics in human history swept through Europe in the 14th century.

Between 1348 and 1351, the Black Death -- or bubonic plague -- killed up to three in five people as it spread rapidly through pre-industrial cities, unchecked by sanitation or modern medicine. That, and subsequent waves of the Yersinia pestis bacterium, claimed the lives of tens of millions of Europeans.

WHO map: Spread of bubonic plague in Europe

Direct descendants of the same plague still exist, killing about 2,000 people each year – although they are often now treatable with antibiotics.

Earlier this month, a 7-year-old girl contracted a genetic variant of Black Death at a campground in Colorado.

A Colorado girl who survived the bubonic plague is happy to be out of the hospital. KUSA's Cheryl Preheim reports.

The girl, who was treated for the illness in a Denver hospital, is thought to have caught the disease in the same way as her medieval ancestors - from fleas living on rodent carcasses.

Next month, a conference of forensic scientists will hear how an international team of experts - led by researchers based at McMaster University in Hamilton, Canada, and the University of Tubingen in Germany - sequenced the entire genome of the Black Death using DNA extracted from plague victims.

The team used DNA from bodies buried at pits including one at East Smithfield, now underneath the heart of central London.

It is the first time an ancient disease has been reconstructed, providing clues as to how it has evolved and whether it could strike again in future.

The scientists hope their work heralds a new era of research into infectious disease.

Additional reporting by Alastair Jamieson, NBC News

More world stories from NBC News:

Follow World News from NBCNews.com on Twitter and Facebook