The modern European gene pool was formed when three ancient populations mixed within the last 7,000 years, Nature journal reports
Blue-eyed, swarthy hunters mingled with brown-eyed, pale skinned farmers as the latter swept into Europe from the Near East.
But another, mysterious population with Siberian affinities also contributed to the genetic landscape of the continent.
The findings are based on analysis of genomes from nine ancient Europeans.
Agriculture originated in the Near East - in modern Syria, Iraq and Israel - before expanding into Europe around 7,500 years ago.
Multiple lines of evidence suggested this new way of life was spread not just via the exchange of ideas, but by a wave of migrants, who interbred with the indigenous European hunter-gatherers they encountered on the way.
But assumptions about European origins were based largely on the genetic patterns of living people. The science of analysing genomic DNA from ancient bones has put some of the prevailing theories to the test, throwing up a few surprises.
Genomic DNA contains the biochemical instructions for building a human, and resides within the nuclei of our cells.
In the new paper, Prof David Reich from the Harvard Medical School and colleagues studied the genomes of seven hunter-gatherers from Scandinavia, one hunter whose remains were found in a cave in Luxembourg and an early farmer from Stuttgart, Germany.
The hunters arrived in Europe thousands of years before the advent of agriculture, hunkered down in southern refuges during the Ice Age and then expanded during a period called the Mesolithic, after the ice sheets had retreated from central and northern Europe.