In the fields by the river Tollense in northern Germany lies a graveyard like no other. Thousands of bones are all that remain of thousands of warriors slaughtered in one of the most archeologically significant battles to occur in Bronze Age Europe.

We now know a handful of the fallen carried a secret weapon: a single gene that gave them and their children a tolerance for cow's milk. Remarkably, it took barely a hundred generations – a blink in evolutionary time – for this ability to spread far and wide throughout the population.

A study led by researchers from Johannes Gutenberg University Mainz in Germany searched the bones of 14 Tollense warriors for signs of an allele called rs4988235-A.

Uncovered in a series of excavations that date back to the mid-1990s, the bones represent just a few combatants within an army of thousands, many of which fell in a conflict that took place more than 3,200 years ago. The site remains significant not just for its size, but as evidence of one of the oldest battles in Europe.

Based on estimates of the dead, the researchers concluded just 7.1 percent of the region's population carried this genetic variant at that point in time.

Also known as the European Lactase Persistence Variant, the gene enhances the production of an enzyme once only active in children, which is responsible for breaking down the milk sugar lactose.

For much of human history, adults have had little need for this ability. But that started to change once we developed an ability to farm milk-producing animals, although the details of the variant's emergence and spread are still hotly debated.

Whatever happened, the variant certainly favoured a diet for milk products well beyond childhood. Fast-forward 1,200 years to modern day Germany, lactase persistence in adults is a common trait.

"Of the present-day population living in this same area, around 90 percent have this lactase persistence," says population geneticist and lead author Joachim Burger.

"This is a huge difference when you consider that there cannot be many more than 120 human generations between then and today."

While rs4988235 isn't the only gene that can help the human body break down the carbohydrate lactose, it is the one researchers think evolved among populations in the Middle East some 10,000 years ago, before eventually becoming genetically dispersed in the west.

Back in 2007, Burger investigated this specific gene for adult lactose tolerance among Europe's very first farming communities – around 7,000 to nearly 8,000 years ago – in an effort to better understand why it might have spread as it did.

Some experts ventured it was the spread of lactose tolerance that encouraged people to farm cows in the first place. Others argue the advent of dairying came first, providing an incentive for genes to spread down through the generations.

Burger's discovery that none of the ancient farmers carried the rs4988235-A allele supports the latter hypothesis. Together with similar studies on the prevalence of lactase persistence in the west, it might seem Europeans were just slow to see the appeal in dairy.

"It is astonishing that at the time of the battle at the Tollense, more than 4,000 years after the introduction of agriculture in Europe, lactase persistence in adults was still so rare," says Burger.

Why the gene proliferated so quickly over the next few millennia is hard to say.

One possibility is populations from the east brought it with them as they migrated, bringing their agricultural skills – and their genes – along to share.

To check if this was indeed the case and verify what they had found in the 14 warriors, sequences from 18 individuals found in another Bronze Age site in Serbia, as well as 37 bodies from even older sites in Eastern Europe and the Pontic-Caspian Steppe region were also analysed for comparison.

Their own low prevalence of the lactase persistence gene makes it unlikely that migrants were carrying it with them.

Viewed in context with other studies gauging how increasingly common rs4988235 might have been throughout Europe across the generations, Burger and his colleagues are confident natural selection caused lactase persistence to spread like wild fire.

"In each generation lactase-persistent individuals have a 6 percent greater chance of surviving to reproductive age than non-lactase-persistent individuals," says Burger.

Being able to get by on fresh milk or preserved dairy well after weaning age could provide populations with a relatively uncontaminated source of nutrients during lean times.

Just how this made a crucial difference for survival in the past few thousand years, especially during the Bronze Age, is a question in need of further research.

It's unlikely to have helped the fallen warriors on Tollense's battlefield. But for those they left behind, that one gene would serve them better than any sword.

This research was published in Current Biology.

Editor's note (14 September 2020): An earlier version of this headline incorrectly said genes for 'lactose intolerance' instead of 'lactose tolerance'. This has now been fixed.