DNA from the bones of medieval leprosy victims is helping scientists improve their understanding of the disease.

The samples, extracted from skeletons buried at the St Mary Magdalen Hill leprosy hospital in Winchester, Hampshire, were used to construct the entire genome, or genetic code, of the ancient leprosy bacterium.

A waxy coat surrounding the bug is believed to have protected it from degradation over the centuries.

The disfiguring disease was once endemic in Europe but largely disappeared during the Middle Ages.

Lead scientist Professor Graham Stewart, from the University of Surrey, said: "Understanding diseases from the past will help us predict emerging infectious diseases and potentially suggest how we may be better able to control existing diseases.

"We hope to analyse even older DNA, tracing leprosy and also tuberculosis back to their origins in human history."

The research, published in the journal Science, is part of an international project to reconstruct genome sequences of bacteria from five medieval skeletons excavated in Denmark, Sweden and the UK.

Scientists compared the ancient genomes with those from 11 modern strains of leprosy from around the world. They found that leprosy in the Americas had a European origin, and strains now found exclusively in the Middle East were once also present in Europe.

Bioarchaeologist Dr Mike Taylor, also from the University of Surrey, said: "The excavations at St Mary Magdalen, Winchester and other European sites bring us literally face to face with the effects the disease had on susceptible people, almost a millennium before the advent of antibiotics."