The origin of the Aids pandemic has been traced to the 1920s in the city of Kinshasa, in what is now the Democratic Republic of Congo, scientists say.
An international team of scientists say a "perfect storm" of population growth, sex and railways allowed HIV to spread.
A feat of viral archaeology was used to find the pandemic's origin, the team report in the journal Science.
They used archived samples of HIV's genetic code to trace its source, with evidence pointing to 1920s Kinshasa.
Their report says a roaring sex trade, rapid population growth and unsterilised needles used in health clinics probably spread the virus.
Meanwhile Belgium-backed railways had one million people flowing through the city each year, taking the virus to neighbouring regions.
Experts said it was a fascinating insight into the start of the pandemic.
HIV came to global attention in the 1980s and has infected nearly 75 million people.
It has a much longer history in Africa, but where the pandemic started has remained the source of considerable debate.
A team at the University of Oxford and the University of Leuven, in Belgium, tried to reconstruct HIV's "family tree" and find out where its oldest ancestors came from.
The research group analysed mutations in HIV's genetic code.
"You can see the footprints of history in today's genomes, it has left a record, a mutation mark in the HIV genome that can't be eradicated," Prof Oliver Pybus from the University of Oxford told the BBC.
By reading those mutational marks, the research team rebuilt the family tree and traced its roots.
HIV is a mutated version of a chimpanzee virus, known as simian immunodeficiency virus, which probably made the species-jump through contact with infected blood while handling bush meat.
The virus made the jump on multiple occasions. One event led to HIV-1 subgroup O which affects tens of thousands in Cameroon.
Yet only once, HIV-1 subgroup M, went on to infect millions of people across every country in the world.
The answer to why this happened lies in the era of black and white film and the tail-end of the European empires.
In the 1920s, Kinshasa (called Leopoldville until 1966) was part of the Belgian Congo.
Prof Oliver Pybus said: "It was a very large and very rapidly growing area and colonial medical records show there was a high incidence of various sexually transmitted diseases."
Sex and railways
Large numbers of male labourers were drawn to the city, distorting the gender balance until men outnumbered women two to one, eventually leading to a roaring sex trade.
Prof Pybus added: "There are two aspects of infrastructure that could have helped public health campaigns to treat people for various infectious diseases, with injections seem a plausible route [for spreading the virus].
"The second really interesting aspect is the transport networks that enabled people to move round a huge country."
Around one million people were using Kinshasa's railways by the end of the 1940s.
The virus spread, with neighbouring Brazzaville and the mining province, Katanga, rapidly hit.
Those "perfect storm" conditions lasted just a few decades in Kinshasa, but by the time they ended the virus was already starting to spread around the world.
Prof Jonathan Ball, from the University of Nottingham, told the BBC: "It's a fascinating insight into the early phases of the HIV-1 pandemic.
"It's the usual suspects that are most likely to have helped the virus get a foothold in humans – travel, population increases and human practices such as unsafe healthcare interventions and prostitution.
"Perhaps the most contentious suggestion 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. I'm sure this suggestion will prompt interesting and lively debate within the field."
Dr Andrew Freedman, a reader in infectious diseases at Cardiff University, said: "It does seem an interesting study demonstrating very elegantly how HIV spread in the Congo region long before the Aids epidemic was recognised in the early 80s.
"It was already known that HIV in humans arose by cross species transmission from chimpanzees in that region of Africa, but this study maps in great detail the spread of the virus from Kinshasa, it was fascinating to read."