Europeans must have thought it was the end of the world. War was spreading across the continent, there was famine after flooding made crops rot in the fields, and an incurable plague was wiping out entire settlements.

The Black Death is considered to have been the deadliest pandemic in history.

Starting in 1347 and lasting five years, the plague killed 30-50% of the population of western Europe. In London, people were dying so fast the town had to establish two new cemeteries outside the city walls. At its height, 200 bodies a day were being sent to the burial sites in East Smithfield, not far from the Tower of London, to be stacked up.

Now, by examining remains from some London cemeteries, scientists have deciphered the genetic makeup of the bacterium that caused the pandemic and have discovered that its DNA is not very different from that of the modern bug that causes bubonic plague.

"We have covered about 99% of the ancient Yersinia pestis [the bacterium that caused the disease] genome," said Johannes Krause, of the University of Tübingen, in Baden-Württemberg, Germany, and also leader of the research team. "When we compare this reconstructed genome with modern strains of Yersinia pestis … we do not see a single position in this ancient genome which cannot be found in modern strains."

To construct the genome sequence, the scientists needed a sample of Y. pestis DNA. They took that from skeletons which were once buried in East Smithfield cemetery. The site was bought late in 1348 or in early 1349 specifically for the burial of Black Death victims, said Kirsten Bos, of McMaster University, one of the paper's authors.

About 2,500 people were buried at the cemetery, which was excavated between 1986 and 1988 by Museum of London staff. The remains of about 600 individuals were unearthed.

Bos extracted the DNA she needed from four teeth, taken from four skeletons: a man, two women and a child. "We were wiggling the teeth out of the skulls in the Museum of London to free them," said Bos.

Until now, no other pathogen sequence has been constructed from material that is more than 100 years old, and, up to now, nothing has been sequenced from ancient skeletons. In 2005, scientists recreated the 1918 Spanish flu virus, one of the deadliest ever to emerge, to try to understand why it was so virulent.

Based on the rate of mutation in the genome, between the Black Death bug and its modern descendants, the researchers were able to extrapolate to when the last common ancestor of all modern Y. pestis strains must have emerged. It appeared to have arrived some time between 1282 and 1343.

"This is when the common ancestor of all modern strains lived," said Krause. "This really suggests that the Black Death pandemic was the first big pandemic that disseminated Y. pestis."