Researchers thawed the mummy of the man, also known as Ötzi, who was killed by an arrow when he was between 40 and 50 years old and hiking across the Ötztal Alps between modern-day Italy and Austria.
When they tested the contents of his stomach, they found a bacterium called Helicobacter pylori, an age-old pathogen that has evolved into different strains according to the region of the world in which it is found.
About half the people on the planet harbour the bacterium in their stomachs.
It can cause ulcers or gastrointestinal distress and is typically spread among children when they play in the dirt.
While researchers cannot be sure if the Iceman was sick due to the infection, they were intrigued by their analysis of the geographic history of the bacterium.
"Surprisingly, a strain of bacterium in his gut shares ancestry with an Asian strain," said the study in the US journal Science.
"In contrast to the fact that most modern Europeans harbour a strain ancestral to North African strains."
If the stomach contents of the Iceman is a good reflection of Europeans 5,300 years ago, the analysis suggests that African migration had not yet resulted in intermingling with the Asian strain of the bacterium.
"This one genome has put things into wonderful perspective for us," said Yoshan Moodley, a researcher at the University of Venda in South Africa.
"We can say now that the waves of migration that brought these African Helicobacter pylori into Europe had not occurred or at least not occurred in earnest by the time the Iceman was around."