The genetic mechanism that allowed two men to be "spontaneously cured" of HIV has been discovered by scientists.

The researchers, from France's Institute of Health and Medical Research (Inserm), said the two patients they studied were not unique and the phenomenon of being cured of HIV is the result of an evolutionary shift between some humans and the virus.

According to AFP, both men were infected with HIV but never developed Aids symptoms because the virus' genetic code had been altered. They believe this alteration was a result of increased activity of the enzyme APOBEC.

In both cases, the virus was unable to replicate in immune cells because of the mutations.

Published in the journal Clinical Microbiology and Infection, the researchers note that about 1% of people infected with HIV are naturally able to keep the virus at clinically undetectable levels.

Known as "elite controllers", the mechanisms of how this group of people rein in the virus has long remained a mystery.

The two men, aged 57 and 31, remained infected but tests could not detect the virus in their blood. Researchers believe a process called endogenisation – a spontaneous evolution between humans and the virus – took place in the men.

Researchers believe this spontaneous evolution may be the key to finding a cure for HIV.

The authors wrote: "We propose that HIV cure may occur through HIV endogenisation in humans. These findings suggest that without therapeutic and prophylactic strategies, after several decades of HIV/host integrations and millions of deaths, it is likely that a few individuals might have endogenised and neutralised the virus and transmitted it to their progeny.

"The work opens up therapeutic avenues for a cure, using or stimulating this enzyme, and avenues for identifying individuals among newly infected patients who have a chance of a spontaneous cure.

"We suggest that persistence of integrated HIV DNA is not a barrier, but on the contrary, may be a prerequisite to HIV cure."