DNA has been collected of 5,000-year-old plague bacteria, taking us the closest we’ve come to the origins of the dreaded disease. In the process thinking about the basis for one of Europe’s most important cultural shifts has been challenged.

More than 5,000 years ago Europe was still in the stone age, but very different from the vision that term might conjure up. Although metalwork was primitive, mega-settlements of 10,000-20,000 people had sprung up in what is now Romania and Ukraine, suggesting a complex society and extensive trading routes.

Then, fairly suddenly, this civilization was wiped out and replaced by Bronze Age people from the east. We also know that plague swept through the region. Dr Simon Rasmussen of the Technical University of Denmark argues samples of plague bacteria show these two events were related, but not in the way people have thought.

Where previously it was considered likely the plague arrived with herders from the Asian steppe, enabling them to overcome the far more populous Europeans who lacked resistance to the disease, Rasmussen argues the plague came first. The depopulated continent it left behind would have been much easier to conquer.

In Cell, Rasmussen describes genetic sequences of the Y. pestis bacterium collected from a 20-year-old woman who died some 4,900 years ago in what is now western Sweden. Given her age, and the number of people buried in the same grave who died around the same time, one of whom also carried the same plague strain, a plague epidemic appears likely.

Rasmussen identified features suggesting this is the closest example we have to the original plague bacteria, diverging from other known strains 5,700 years ago. This would be shortly after it evolved from a fairly harmless microorganism. The types of plague that caused so much damage in the middle ages, and those still around today, appeared 400-600 years later.

That timing suggests the plague was well established long before the great migrations from the Asian steppe, and the new arrivals could not have brought it with them. Instead, Rasmussen thinks the plague evolved in Europe’s mega-settlements.

“[They] were the largest settlements in Europe at that time, ten times bigger than anything else. They had people, animals, and stored food close together, and, likely, very poor sanitation,” he notes in a statement. “That’s the textbook example of what you need to evolve new pathogens.” From there is spread through trade routes to less populated Sweden

The mega-settlements started being abandoned 5,500 years ago. Centuries later, the population remained too reduced to resist new arrivals.

Rasmuseen hopes the work will shed light on the evolution of mild pathogens to destructive diseases, including recent versions like Zika.