Image caption A mass burial of battle victims from the Xiongnu period in Mongolia. The Xiongnu warriors are linked to the nomadic people who would later become known as the Huns

Scientists say one of the deadliest plagues in history may be linked to the migration westward of the Hun peoples.

The Justinian Plague, which struck in 541 AD, may have killed as many as 25 million.

Now, scientists say the outbreak probably originated in Asia, not Egypt as contemporary and more recent chroniclers had thought.

The finding comes from analysis of DNA found in 137 human skeletons unearthed on the Eurasian steppe.

The steppe region covers a vast area, spanning some 8,000km from Hungary to north-eastern China. The large sample of individuals covers a date range of 2,500 BC - 1,500 AD.

Writing in the journal Nature, Eske Willerslev, Peter de Barros Damgaard and others describe how they sequenced genomes from these individuals and, in two of them, recovered DNA from a strain of plague related to the one responsible for the Justinian Plague. A separate paper in the same edition of the journal describes the discovery of hepatitis B strains in ancient people from the Steppe.

The plague pandemic is named after Justinian I, who ruled the Eastern Roman Empire (also known as the Byzantine Empire) at the time of the initial outbreak. Indeed, it is said that Justinian himself caught the disease, but recovered.

Image copyright Getty Images Image caption The city of Istanbul is the present-day incarnation of Constantinople, which was devastated by the Justinian Plague

The outbreak in Constantinople (which is now Istanbul in Turkey) was thought to have been carried to the city by rats on grain ships arriving from Egypt. While the plague was present in north-east Africa, the new research makes an origin in Central and Eastern Asia more likely.

The researchers say the plague probably moved westward with the migration of tribes who would become known to Roman chroniclers as the Huns.

Nomadic alliance

The Huns were not one people but formed from diverse nomadic groups such as the Scythians and the Xiongnu who forged allegiances to extend their power and territory. The Scythians were known to the Romans and Greeks as proficient horsemen living on the border between Europe and Asia. The Xiongnu are first attested further east, and fought a bloody war with the forces of Han dynasty China.

"In some of these Huns, we find the basic form of the Justinian Plague... that killed off millions of people in Europe," said co-author Eske Willerslev, from the University of Copenhagen.

DNA from a strain of the plague bacterium (Yersinia pestis) closely related to the one involved in the Justinian pandemic was found in a Hun individual from the Tian Shan mountains of Central Asia who died around 200 AD. This Tian Shan strain is also more "basal" than the Justinian form of the plague, meaning it is further back in the plague's genetic "family tree".

Image copyright Hulton Archive Image caption Justinian is said to have contracted the plague, but recovered from it

A relative of the Justinian Plague strain also turned up in an individual from North Ossetia, Russia, whose age is more uncertain, but who probably died between the sixth and ninth centuries AD.

The Huns probably began their westward movement in the second or third century BC, appearing on the borders of the Roman Empire in the fourth century. They established a short-lived dominion in Europe through the displacement of existing tribal groups and with attacks on the Empire itself.

Their ferocity was embodied by Attila, the Hunnic leader who fought numerous military campaigns against Rome.

Horses for watercourses

Co-author of the study Peter de Barros Damgaard told BBC News: "Our strain dates back to [around] 200 AD, so several hundreds of years before the Justinian plague wreaked Europe.

"An appearance has also been found in Egypt. As such, increased interaction under the Hunnic and later the Turk Khaganate would have aided in bringing this plague strain through the Silk Road.

"Intensified trade is a very likely factor."

DNA analysis of this plague strain shows it possessed mutations that would have allowed its transmission via fleas, much like the later Black Death. But whether this was the principal mode of spread in the sixth century outbreak remains unknown.

Dr Damgaard said: "An interesting speculation is that Xiongnu warriors are documented through ancient Chinese historical sources to have used biological warfare by putting dead horse bodies in water sources.

"I like to speculate that this would have been the breeding ground for plague, and once again the human trajectory would have been linked to horses, but I have no way of proving that."

Another paper in Nature, also led by Eske Willerslev, reports the oldest evidence of hepatitis B viruses (HBV) in humans. The findings come from viral sequences recovered from 12 ancient people on the steppe.

Barbara Mühlemann, a co-author from the University of Cambridge, UK, said: "People have tried to unravel the history of HBV for decades - this study transforms our understanding of the virus and proves it affected people as far back as the Bronze Age.

"We have also shown that it is possible to recover viral sequences from samples of this age which will have much wider scientific implications."

In 2015, some 257 million people were estimated to be infected with HBV; some 887,000 died due to complications such as liver cancer.

Follow Paul on Twitter.