The birth of a pandemic is surprisingly fickle. The disease’s death rate may not matter as much as you think. Nor, even, might the rate of infection. Indeed, weak diseases can spread like rumor. And strong ones die — not because they don’t pack a punch, but because the environmental conditions aren’t right.

There’s a reason Ebola has crippled West Africa, where large swaths of a distrustful population deny its existence and local governments don’t have the tools to defeat it. And there’s a reason Nigeria, a country with a more muscular government, has been able to limit its outbreak. Conditions determine a disease’s survival rate — not lethality.

Nowhere is this more apparent than in the origins of the HIV pandemic. A new study in Science traces the origins of HIV back to 1920 and the city of Kinshasa, in what is now the Democratic Republic of Congo. It was a city with the “perfect storm” that facilitated the rapid and expansive growth of the disease, which would infect more than 75 million people and continues to ravage millions today.

“Until now, most studies have taken a piecemeal approach to HIV’s genetic history, looking at particular HIV genomes in particular locations,” lead author Oliver Prybus of Oxford University said in a statement. “…We can say with a high degree of certainty where and when the HIV pandemic originated. It seems a combination of factors in Kinshasa in the early 20th century created a ‘perfect storm’ for the emergence of HIV, leading to a generalized epidemic with unstoppable momentum that unrolled across sub-Saharan Africa.”

HIV, like Ebola, has different strains. HIV has its roots in chimpanzees. During the handling of an infected chimp, the disease has jumped several times to humans, spawning numerous subgroups. One such HIV subgroup is “O,” which infected thousands in Cameroon. But only one — called “M” — grew into a pandemic. What made it different?

“Perhaps the most contentious suggestion [in this study] is that the spread of the M-group viruses had more to do with the conditions being right than it had to do with these viruses being better adapted for transmission and growth in humans,” scientist Jonathan Ball of the University of Nottingham told the BBC.

The environment of Kinshasa, which interconnected many of the central African cities and was awash in sex workers, made it a perfect place for HIV. “Social changes, such as the changing behavior of sex workers, and public health initiatives against other diseases that led to the unsafe use of needles may have contributed to turning HIV into a full-blown epidemic,” Oxford said in a release on the study.

Kinshasa was a regional boom town. With an abundance of trade and work opportunities, it drew large numbers of male laborers. The gender balance tipped to heavily favor men over women, which gave way to a robust sex trade. It was a necessary component for the pandemic to spread, considering this little-reported aspect of HIV: It’s not that infectious.

“People can have sex hundreds of times without passing the virus on,” reported The Washington Post in 2012. “To spread widely, HIV requires a population large enough to sustain an outbreak and a sexual culture in which people often have more than one partner, creating networks of interaction that propel the virus onward.”

Kinshasa, then the largest city in central Africa, had that sort of population. And by the 1940s, according to the Guardian, Kinshasa’s railways transported more than 1 million people per year.

“Our research suggests that following the original animal to human transmission of the virus there was only a small ‘window’ during the Belgian colonial era for this particular strain of HIV to emerge and spread into a pandemic,” Pybus said.

The findings add more weight to earlier research that analyzed where the HIV group M came from. In 2008, researchers at the University of Arizona discovered it was much older than previously thought by analyzing two old samples, one of which came from Kinshasa in 1959. Though HIV only reached global saturation in the 1980s, scientists realized it was significantly older.

The path of Kinshasa’s HIV hinted at how modern travel could midwife a global pandemic. Scientists have tracked separate subtypes of M from Lake Victoria to Botswana to Haiti and then to the United States and Europe. “By the 1960s, transport systems, such as the railways that enabled the virus to spread vast distances, were less active,” Pybus said. “But by that time, the seeds of the pandemic were already sown across Africa and beyond.”