During the 18th and 19th centuries, in the swiftly industrializing countries of Europe and North America, tuberculosis–or the dreaded “consumption”–reached epic proportions. It was the leading cause of death among all age groups in the Western world until the early 20th century, when better health and hygiene standards led mortality rates from the disease to decline. With the mid-century advent of antibiotics, treatment of TB became vastly more effective, and the once-common practice of treating patients for years in sanatariums became a thing of the past.

Yet even today, the disease remains a global health threat, thanks to its prevalence in developing countries with lower hygiene standards and higher population densities. TB is a leading killer among people infected with the HIV virus, and kills as many as 2 million people a year worldwide. To make matters worse, new strains of the bacterium that have arisen among infected populations appear resistant to conventional antibiotics, making effective treatment more and more difficult.

Humans’ long-running, dysfunctional relationship with TB is well documented. TB was widespread in Ancient Egypt, for example: Signs of the bacteria have been found in mummies dating back some 6,000 years. Scientists have traditionally traced the disease’s origins to a period known as the Neolithic Transition, which took place in Africa some 10,000 years ago. At that time, humans began cultivating agriculture and domesticating animals, and the bacteria that causes TB was believed to have originated in these animals and then passed to humans.

Now, a team of international researchers led by Sebastien Gagneux of the Swiss Tropical and Public Health Institute has opposed these traditional findings, arguing instead that TB originated in the same place (Africa) but much earlier, and with early humans themselves, not with animals. Through detailed genetic analysis of 259 samples of TB bacteria collected from different parts of the world, they created a “family tree” of the germ, marking its evolution throughout human history with the genetic mutations they observed. As reported in the journal Nature Genetics earlier this week, their findings indicate that TB mycobacterium emerged some 70,000 years ago among humans in Africa. It then migrated with them, slowly spreading around the world as the population expanded.

How TB managed to stick with humans over such a long period of time has been a scientific mystery. On one hand, TB is an exclusively human pathogen, and needs human hosts to survive. On the other, it is extremely effective at killing those humans it does infect, which would appear to threaten the survival of the TB bacteria itself. The genetic research of Gagneaux and his team helps to explain this paradox. It reveals that some 20,000 to 30,000 years ago, TB bacteria developed the ability to go dormant in its hosts, then reemerge decades later. This ability may have developed as a survival strategy in the age of small, widely dispersed populations of hunter-gatherers, when TB might otherwise have killed off its isolated hosts quietly and died out itself, without gaining the opportunity to spread.

This latency is what makes TB so hard to control, as the bacteria can hide out for extended periods among human hosts and break through in new environments. According to Gagneaux: “We see that the diversity of tuberculosis bacteria has increased markedly when human populations expanded.” Over millennia, humans might even have benefited from their relationship with TB, he suggests, as latent infection with the germ might have provided immunity against more lethal pathogens that existed in new human environments, or among archaic human populations.

Going forward, Gagneaux and his team plan to use the genetic data gathered during their research to study the activation and deactivation mechanism of the bacteria. Their hope is that a better understanding of the relationship between humans and TB–and its complicated history–will help find a way to fight the disease and break its long, devastating pattern.