Prehistoric humans were infected with a bug that causes 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."
Ulcer bacteria has followed man for 60,000 years
Out of Africa: Stomach Ulcer Bug Migrated with Humans 60,000 Years Ago