DNA sequenced from nearly 40 ancient skeletons has shed light on the complex prehistoric events that shaped modern European populations.
A study of remains from Central Europe suggests the foundations of the modern gene pool were laid down between 4,000 and 2,000 BC - in Neolithic times.
These changes were likely brought about by the rapid growth and movement of some populations.
The work by an international team is published in Nature Communications.
Decades of study of the DNA patterns of modern Europeans suggests two major events in prehistory significantly affected the continent's genetic landscape: its initial peopling by hunter-gatherers in Palaeolithic times (35,000 years ago) and a wave of migration by Near Eastern farmers some 6,000 years ago. (in the early Neolithic)
Analysis of DNA from ancient remains in Central and Northern Europe appears to show that the genetic legacy of the hunter-gatherers was all but erased by later migrations, including pioneer Neolithic farmers but possibly by later waves of people too.
The latest paper reveals that events some time after the initial migration of farmers into Europe did indeed have a major impact on the modern gene pool.
In the study, an international team of researchers focused on mitochondrial DNA (mtDNA), the information in the cell's "batteries". This type of DNA is passed down, almost unchanged, from a mother to her children.
By studying the mutations, or changes, in mtDNA sequences, researchers are able to probe the maternal histories of different human populations. It has enabled them to build a "family tree" of maternal ancestry, and group different mtDNA lineages together based on shared mutations.
For the latest paper, the authors chose to focus on one of these groupings known as haplogroup H.
Haplogroup H dominates mtDNA variation in Europe. Today, more than 40% of Europeans belong to this genetic "clan", with frequencies much higher in the west of the continent than in the east.
The team selected 37 human remains from the Mitelelbe Saale region of Germany and two from Italy, all of whom belonged to the "H" clan. This area has a very well preserved collection of human skeletons forming a continuous record of habitation across different archaeological cultures since Palaeolithic times.
The remains investigated here span 3,500 years of European prehistory, from the Early Neolithic to the Bronze Age.
Sequencing the mitochondrial genomes of these 39 remains revealed dynamic changes in DNA patterns over time. The team found that the genetic signatures of people from the Early Neolithic period were either rare or absent from modern populations.
And only about 19% of the Early Neolithic remains from Central Europe belonged to the H haplogroup.
But, from the Middle Neolithic onwards, DNA patterns more closely resembled those of people living in the area today, pointing to a major - and previously unrecognised - population upheaval around 4,000 BC.
Co-author Prof Alan Cooper, from the University of Adelaide in Australia, said: "What is intriguing is that the genetic markers of this first pan-European culture, which was clearly very successful, were then suddenly replaced around 4,500 years ago, and we don't know why.
"Something major happened, and the hunt is now on to find out what that was."
Population growth and migration from western Europe may have driven up the frequency of people carrying haplogroup H.
A significant contribution appears to have been made in the Late Neolithic, by populations linked to the so-called Bell Beaker archaeological culture. Sub-types of haplogroup H that are common today first appear with the Beaker people and the overall percentage of individuals belonging to the H clan jumps sharply at this time.
The origins of the "Beaker folk" are the subject of much debate. Despite having been excavated from the Mittelelbe Saale region of Germany, the Beaker individuals in this study showed close genetic similarities with people from modern Spain and Portugal.
Other remains belonging to the Late Neolithic Unetice culture attest to links with populations further east.
"We have established that the genetic foundations for modern Europe were only established in the Mid-Neolithic, after this major genetic transition around 4000 years ago," said co-author Dr Wolfgang Haak.
"This genetic diversity was then modified further by a series of incoming and expanding cultures from Iberia and Eastern Europe through the Late Neolithic."
Dr Spencer Wells, director of the Genographic Project, which was behind the study, commented: "Studies such as this on ancient remains serve as a valuable adjunct to the work we are doing with modern populations in the Genographic Project.
"While the DNA of people alive today can reveal the end result of their ancestors' ancient movements, to really understand the dynamics of how modern genetic patterns were created we need to study ancient material as well."
Paul.Rincon-INTERNET@bbc.co.uk and follow me on Twitter