For decades, scientists have turned to DNA to learn about our past, but their studies have been limited to eras much earlier than recorded history. Scientists have used genetics to mark the evolutionary split between humans and chimps as somewhere between 4.6 and 6.2 million years ago. They have identified a “mitochondrial Eve,” a woman who lived 100,000 to 200,000 years ago and who is a female ancestor of all human beings alive today. The National Genographic Project is tracking down splits between different human populations that happened between 60,000 and 20,000 years ago. And researchers have discovered a DNA record of interbreeding between humans and Neanderthals that dates back somewhere between 47,000 and 65,000 years ago.

But what about more recent history? Most of the different ethnic groups around the world, and especially those in Europe, were formed much more recently than the time when humans and Neanderthals hooked up. In fact, individuals who are the ancestors of nearly everyone alive today could have lived as recently as just five thousand years ago. A little back-of-the-envelope math shows why this could be true. In theory, the number of your ancestors doubles with each generation you go back—you have four grandparents, eight great-grandparents, and 30 generations back you would theoretically have roughly one billion ancestors. Your ancestors 30 generations back lived less than 1,000 years ago, when the human population of the entire world was less than 350 million. While this makes it impossible for anyone to have a billion ancestors who lived around 1000 CE, it’s likely that any two random strangers from distant parts of an ethnically diverse area like Europe do share a surprisingly recent ancestor.

Major historical migrations and invasions of the last 1,500 years have left a big impression on Europe’s genetic terrain.

If Europeans are likely to share recent ancestors with random strangers, then how did so many different ethnic groups arise in such a relatively small geographical area? Peter Ralph and Graham Coop, two geneticists at the University of California-Davis, used new genetic data to answer this question, by measuring the relatedness of different groups of Europeans. Their results confirm what we expect theoretically: “even pairs of individuals from opposite ends of Europe share hundreds of genetic common ancestors” within the last 3,000 years. They also found that major historical migrations and invasions of the last 1,500 years have left a big impression on Europe’s genetic terrain.

Ralph and Coop based their study on the fact that long blocks of identical DNA in two different people signify that those two people inherited that same block of DNA from a shared ancestor. For example, two siblings will share many long blocks of DNA inherited, unchanged, from their maternal grandmother. Two distant cousins will share unchanged blocks of DNA inherited from a great-great-grandfather, but those blocks will be shorter and there will be fewer of them.

To measure the genetic relatedness of people from different countries in Europe, Ralph and Coop counted the number of blocks of DNA that individuals in one country shared with people in another country. Not only did the scientists find that nearly all Europeans in their sample shared very recent ancestors with geographically distant strangers, but they also detected very strong signatures of recent migrations, such as Irish into England and Poles into Germany.

Dramatic new genetic patterns in Europe were set up when the Huns rode out of the steppes and into Eastern Europe toward the end of the fourth century, followed by the Slavs a few centuries later. The genetic aftermath of these large-scale migrations is substantial: Eastern Europeans today are more closely related to each other than any other broad-geographical group in Europe. Strangely, the close relationships between Eastern Europeans includes the non-Slavic speaking Hungarians and Romanians: their genes, but not their languages, were changed by these great migrations.

Unlike Eastern Europeans, the Italians are least likely to share recent ancestors with anyone else in Europe, and in fact, Italians are even less related to each other than other European populations. Like Eastern Europe, the Italian peninsula was invaded by outsiders during the first millennium. But these new arrivals, the Germanic tribes, left very little genetic trace. Unlike the Huns and the Slavs, the incoming Goths and Vandals moved into areas that were already densely populated, and so their political impact was greater than their genetic one.

Like geologists who can tell us the history of mountains and valleys by reading the rocks, geneticists are now beginning to understand the forces that shape our genetic terrain. Different kinds of historical events clearly have different effects on large-scale genetic relationships, and studies like the one by Ralph and Coop show us just how quickly a genetic landscape can be remodeled.