It's no secret that beer and cheese go hand in hand -- but a new study reveals how deep their roots run in Europe, where workers at a salt mine in Austria were gorging on both up to 2,700 years ago.

Scientists made the discovery by analyzing samples of human excrement found at the heart of the Hallstatt mine in the Austrian Alps. The study was published in the journal Current Biology on Wednesday.

Frank Maixner, a microbiologist at the Eurac Research Institute in Bolzano, Italy, who was the lead author of the report, said he was surprised to learn that salt miners more than two millennia ago were advanced enough to "use fermentation intentionally."

"This is very sophisticated in my opinion," Maixner told AFP. "This is something I did not expect at that time."

The finding was the earliest evidence to date of cheese ripening in Europe, according to researchers.

And while alcohol consumption is certainly well documented in older writings and archaeological evidence, the salt miners' feces contained the first molecular evidence of beer consumption on the continent at that time.

This undated image courtesy of the Museum of Natural History of Vienna shows a roughly 2,700-year-old human excrement from the Hallstatt salt mines in which beans, millet and barley are clearly visible
This undated image courtesy of the Museum of Natural History of Vienna shows a roughly 2,700-year-old human excrement from the Hallstatt salt mines in which beans, millet and barley are clearly visible Museum of Natural History of Vienna / Anwora

"It is becoming increasingly clear that not only were prehistoric culinary practices sophisticated, but also that complex processed foodstuffs as well as the technique of fermentation have held a prominent role in our early food history," said Kerstin Kowarik of the Museum of Natural History Vienna.

The town of Hallstatt, a UNESCO World Heritage Site, has been used for salt production for more than 3,000 years.

The community "is a very particular place, it's located in the Alps, in the middle of nowhere," he explained. "The whole community worked and lived from this mine."

The miners spent their entire days there, working, eating and going to the bathroom in the mine.

The roughly 2,700-year-old human excrement from the Hallstatt salt mines demonstrates just how far back humans' love of beer and cheese goes
The roughly 2,700-year-old human excrement from the Hallstatt salt mines demonstrates just how far back humans' love of beer and cheese goes Museum of Natural History of Vienna / Anwora

It is thanks to the constant temperature of around 8C (46F) and the high concentration of salt at the mine that the miners' feces were preserved particularly well.

Researchers analyzed four samples: one dating back to the Bronze Age, two from the Iron Age and one from the 18th century.

One of them, about 2,700 years old, was found to contain two fungi, Penicillium roqueforti and Saccharomyces cerevisiae. Both are known today for their use in food making.

"The Hallstatt miners seem to have intentionally applied food fermentation technologies with microorganisms which are still nowadays used in the food industry," Maixner said.

The researchers also studied the miners' diet, which consisted mainly of cereals, some fruit, and beans and meats as the source of protein.

"The diet was exactly what these miners needed, in my opinion," Maixner said. "It's clearly balanced and you have all major components you need."

The main difference with today's menus is the degree of food processing, which was very low at the time. The Bronze and Iron Age miners used whole grains, suggesting the consumption of some kind of porridge. For the 18th-century miners, the grains appeared ground, indicating they ate bread or cookies.

One of the study's other findings was the composition of the miners' microbiota, or the set of bacteria present in their bodies.

In the four samples studied, the microbiota were very similar to that of modern non-Western populations, which tend to have a more traditional lifestyle.

This suggests a "recent shift" in the microbiota of industrialized humans, "probably due to modern lifestyle, diet, or medical advances," the study said.

However, microbiota are often linked to different modern diseases, Maixner said. According to him, determining when exactly this change occurred could help scientists understand what caused it.