Prehistoric humans were infected with a bug that causes stomach ulcers, a study in the journal Nature suggests.
H. pylori bacteria are a leading cause of stomach ulcers
A UK-German team used a computer model to show that both Helicobacter pylori and humans migrated from Africa around 58,000 years ago.
The bacteria seem to have remained "intimately associated" with human populations ever since, they say.
Australian scientists won the Nobel Prize for Medicine in 2005 for showing the bacteria can cause stomach ulcers.
In 1982, Robin Warren and Barry Marshall discovered that H. pylori colonised about 50% of stomachs.
Before their research, stress and lifestyle were considered the major causes of stomach and intestinal ulcers.
It is now firmly established that the bacteria cause more than 90% of duodenal (intestinal) ulcers and up to 80% of gastric (stomach) ulcers.
In the latest study, a team from Cambridge University and the Max Planck Institute in Berlin compared the spread of early humans from East Africa around the world with that of H. Pylori.
Previous research on DNA sequences has shown the further humans migrated from Africa the more genetically distinct they became.
The same was found to be true of H. Pylori.
Combining this genetic analysis with a computer model that predicted the spread of bacteria across the world, the team showed that H. Pylori migrated from East Africa at the same time as humans and followed the same movement patterns thereafter.
Dr Francois Balloux, who led the UK research, said: "The research not only shows the likelihood that for tens of thousands of years our ancestors have been suffering the effects of these bacteria but it also opens up possibilities for understanding early human migration."
Co-researcher Dr Mark Achtman added: "There were striking parallels between human and bacterial patterns of isolation by distance and decreased diversity with distance from Africa.
"Simulations indicated a comparable time for the time since H. pylori left Africa to that of modern humans."
Professor John Atherton, professor of gastroenterology at the University of Nottingham, said the study backed most experts' views on the origin of the bacteria.
"Most people working in the field have thought that Helicobacter evolved with man but this paper is good evidence that this is in fact the case.
"It's quite interesting and valuable to show that Helicobacter has been with humans since the early days."
But he added that researchers were still working hard to find out why stomach ulcers appeared to be a modern phenomenon.
"It begs the question - if Helicobacter has been in humans ever since we have been out of Africa why have ulcers only arrived recently, around the time of the industrial revolution?
"Most people think the reason isn't because Helicobacter was different but something to do with our environment."
Dr Achtman added: "Many medical diseases have only been clearly distinguished in fairly recent times, for example typhoid fever, although the bacteria have existed much longer."