HIV almost certainly originated in the 1920s in Kinshasa, in the Democratic Republic of Congo, new research has found.

An international team led by scientists from Oxford University and University of Leuven scientists has reconstructed the history of HIV to statistically estimate how it emerged and spread. They conclude that a" perfect storm" of events came together, which fuelled the virus's growth into a pandemic that is still with us today.

Their analysis suggests it wasn't simply explosions in African populations that caused HIV to multiply. Instead, it appears that increased travel and changing societal attitudes about sex led to the spread of a virus that has infected almost 75 million people to date.

Research has shown that HIV jumped from primates to humans at least 13 times at the turn of the century, probably through the handling of bush meat. Most of those infected caused small clusters of infection that eventually died out. But one of those clusters somehow able to leave the jungle and move through cities.

The researchers say it wasn't anything special about the strain behind the global HIV pandemic, called HIV-1 group M, that set it on course to become a pandemic. Rather, it was things like increased migration along the DRC's railways in the early part of the 20th century.

Thanks to the railways, Kinshasa became one of the best connected central African cities, and by the end of 1940s, over one million people were travelling through the capital by train. That allowed those who became infected to continue spreading the virus to others around the vast country, which is about the size of western Europe. Many of these transmissions occurred among male workers infecting Congolese sex workers.

By the time DRC gained independence in 1960, societal attitudes about sex were changing. Instead of being confined to only certain clusters of people, the virus soon went mainstream.

"We think it is likely that the social changes around the independence in 1960 saw the virus 'break out' from small groups of infected people to infect the wider population and eventually the world'," study author Dr. Nuno Faria of Oxford University's Department of Zoology said in a statement.

The Congolese were already using railways less by the end of the 1960s, meaning the window of opportunity for the virus to spread was open for only a short while, says study author Prof. Oliver Pybus Oxford University's Department of Zoology.

"But by that time, the seeds of the pandemic were already sown across Africa and beyond," Pybus said.

More than 35 million people worldwide are currently infected with HIV, says the United Nations AIDS agency, UNAIDS. The number of people dying from AIDS-related causes worldwide hit a peak of 2.3 million in 2005, but thanks to educational campaigns and the increased availability of antiretroviral therapy, the annual death toll has fallen to around 1.6 million.

A report of the research is published in this week's Science.