The ability for adult Europeans to drink milk was inherited from Russian herders just 4,000 years ago, a genetic study has shown.

The findings come from the largest ancient DNA study of its kind published in the journal Nature.

"Everyone assumed it came to Europe with the first farmers," co-author Dr Bastien Llamas, from the Australian Centre for Ancient DNA at the University of Adelaide, said.

"But you actually had a 4,500-year period when European farmers could not actually drink milk."

The study of DNA from 230 Eurasians who lived between 6500 BC and 300 BC showed that Russian herders from the Great Steppes brought the enzymes for lactose tolerance into Europe.

"Suddenly 4,000 years ago there's a revolution when the Steppe herders brought the enzymes they needed," Dr Llamas said.

Earlier this year, Dr Llamas and colleagues found Europeans descended from three groups: Stone-Age hunter-gatherers, farmers that migrated from Anatolia (modern-day Turkey), and nomadic herders that migrated west from the Great Steppe in Russia.

For this study, the researchers analysed patterns in the genomes of these groups to look at how human traits had changed since the advent of agriculture in Europe around 8,500 years ago.

One of the most surprising findings related to the emergence of the genetic mutation that enables humans to drink raw milk.

This mutation enables the enzyme lactase, which digests lactose in milk, to remain active long after weaning occurs.

Most people had assumed the mutation, which is widespread in Europe today, would have been introduced by the Anatolian farmers, who had been keeping animals such as cows since around 6500 BC.

However, Dr Llamas and colleagues found the mutation did not enter the European population until 4,000 years later, when the Russian herders arrived.

Origin of skin colour and height differences

The study also sheds light on the development of disease resistance, and the origin of light skin colour and height differences among Europeans.

As well as bringing the lactose tolerance trait to Europe, the Russian herders also brought height to the Northern Europeans, Dr Llamas said.

Meanwhile, the shorter Mediterranean stature was a result of the earlier Anatolian farmer influx, who also brought light skin colour into Europe, he said.

Finally, the study found resistance genes to tuberculosis and leprosy emerged after the emergence of agriculture.

This makes sense, Dr Llamas said, given that agriculture was also associated with an increase in density in human populations.

This allowed pathogens to establish and spread through the population quickly, he said.

While humans originally evolved to live in a sparsely populated, hunter-gatherer environment, societal changes with the advent of agriculture brought pressures on humans to adapt to such things as new pathogens.

"Whether you like it or not, generation after generation, this constant pressure on the environment will shape humans genetically," Dr Llamas said.

The research was led by Dr Wolfgang Haak from the Max Planck Institute for the Science of Human History, Dr Ron Pinhasi of Belfield University College Dublin, and Dr David Reich of Harvard Medical School.

The samples analysed came from western Russia, Turkey, Romania, Germany, France, Spain, Sweden and other countries.

"Two-hundred-and-thirty ancient humans is an absolutely massive sample," Dr Llamas said. "We can do really statistically strong analysis.

"All of those 230 individuals were screened across their genomes for more than a million variable sites. That means we have a very accurate picture of what's going on in their genomes.

"For once we can have the same power for genomic analysis in ancient populations as we have in modern populations."