Over the past two decades, the technology used to analyze the degraded DNA of ancient remains has dramatically advanced. As a result, researchers in a new study were able to map the genomes of 51 individuals who lived in Europe between 45,000 and 7,000 years ago and draw intriguing conclusions about prevailing genetic traits such as skin and eye color. The scientists also found that Neanderthal ancestry in Europeans has been shrinking over time—possibly due to natural selection—and traced complex patterns of mass migration spanning thousands of years.

Within the past five years, advances in DNA analysis of ancient remains have allowed scientists to map the genetic code of a 700,000-year-old horse in Siberia, link the Ice Age Clovis culture to modern-day Native Americans and confirm the devastating impact of the European arrival in the New World, among other notable findings. Now, a new genetic study has unlocked the secrets of Ice Age Europeans over a period of nearly 40,000 years.

The 51 individuals, dating from 45,000 to 7,000 years ago, whose DNA was analyzed by some six dozen researchers on four continents in the new study, represent a good deal of the known ancient skeletons from the time period. According to the study’s findings, published this week in the journal Nature, analysis of the DNA of Ice Age Europeans showed they had dark complexions and brown eyes. Blue eyes as a genetic trait only began to spread after 14,000 years ago, and it was only after 7,000 years ago that fair complexions appeared across much of the continent. Both traits, the researchers concluded, were likely brought to Europe by migration from the Near East.

As Professor David Reich of Harvard Medical School, co-author of the new study, told BBC News: “Because we’ve studied so many ancient humans from Europe from the beginning of the modern human occupation, we’re able to form a picture of how populations transformed over time.” Reich conducted the new research along with Svante Paabo from Germany’s Max Planck Institute for Evolutionary Anthropology and others. Quiaomei Fu, a genetics researcher at Harvard and the Chinese Academy of Sciences in Beijing, did much of the work extracting the DNA from the ancient remains.

In one of the study’s major findings, the researchers showed that between 37,000 years ago and 14,000 years ago, different groups of Europeans were descended from a single founder population. Around the same time, Neanderthal ancestry was on the decline, a process that would continue for millennia to come. The scientists believe that much of the DNA Neanderthals passed to humans had negative effects, and that the genetic inheritance was progressively lost due to natural selection.

The DNA research also illuminated the complex patterns of ancient migration, often based on climate change, that occurred during this period of European prehistory. As Reich put it: “We see multiple, huge movements of people displacing previous ones.” One outstanding example involved the Aurignacian culture, one of the most important populations in Ice Age Europe. According to the new study, another group of humans called the Gravettians displaced the Aurignacians between 34,000 and 26,000 years ago. Yet despite this displacement, modern Europeans can trace their genetic ancestry back to the Aurignacians.

Around 19,000 years ago, at the peak of the Ice Age, people with genetic ties to the Aurignacians apparently migrated and expanded across Europe from the southwest, or present-day Spain. Though the genetic signature of the Aurignacians largely disappeared during the age dominated by the Gravettian culture, the researchers found it again in the so-called “Red Lady of El Mirón Cave,” a female skeleton found in northern Spain that dates to some 15,000 years after the Gravettians’ arrival.

Another intriguing migration occurred some 14,000 years ago, when the study shows the European population became more closely related to people from the Middle East, Turkey and the Caucuses. Earlier research had suggested this transition didn’t occur until 8,500 years ago, when Turkish farmers brought agriculture to Europe. The earlier date coincides with the first major warming period that occurred after the Ice Age drew to a close, suggesting that such new arrivals expanded into Europe from the southeast.

“We see that the founding European populations persisted over the last glacial maximum some 25,000 to 14,000 years ago, but afterward there were dramatic re-jiggerings as people moved back from warm-weather refuges in the southwest and the southeast, transforming the human landscape of Europe,” Pääbo said in an announcement about the study’s findings. “It is amazing how ancient DNA now starts to provide us with a detailed account of the earliest history of present-day Europeans.”