Two different strains of a virus affecting monkeys probably combined to create the form of HIV which has spread around the world, say scientists.
They believe the two strains of Simian Immunodeficiency Viruses (SIVs) first came together in chimpanzees who had eaten monkeys carrying the different strains.
The viruses' DNA then merged, creating a new form - the forerunner of HIV-1.
This was then passed to humans - possibly through the handling of contaminated chimpanzee flesh.
The theory has been put forward by a team from Nottingham University, who carried out an extensive genetic analysis of SIV strains.
In particular they focused on a strain called SIVcpz, which is found in chimpanzees and which has previously been shown to be closely linked to HIV-1.
In some ways, SIVcpz was found to resemble SIVrcm, a virus endemic in red-capped mangabeys.
But in other respects it closely matched another form of the virus, SIVgsn, which is found in the spot-nosed
Chimpanzees are known to hunt and eat both species of monkey.
Writing in the journal Science, the researchers said: "Because chimpanzees are known to hunt smaller monkey species, the simplest explanation appears to be that both
SIVrcm and SIVgsn have been acquired by chimpanzees and recombined in that host."
They said the finding was important evidence that another primate species besides humans acquired SIV by cross-species transmission under natural
Last year French researchers found that SIVgsn contained a particular gene which gave it the potential to jump from monkeys to man.
The Nottingham researchers also warn that because of the similarity between chimpanzees and humans, any virus that successfully adapts to spreading among chimpanzees would be a candidate for a further jump to humans - a potential new strain of HIV.
Exactly how SIVcpz was transmitted to humans to re-emerge as HIV is not known.
One theory is that "bush meat" consumption may have been to blame.
If people had cut themselves while preparing infected meat, they could have acquired the virus.
SIVs are a large family of viruses, carried by many species of monkeys in Africa, but chimpanzees are the only apes known to be naturally infected.