A fall in the proportion of gay and bisexual men using condoms is behind the rise in HIV infections in those groups in the UK, say researchers.
Wider use of anti-retroviral drugs has helped to stop a sharper rise, a study by the Health Protection Agency (HPA) and a number of universities found.
They found a 26% rise, from 1990-2010, in the proportion of men who have sex with men who did not use condoms.
The report said the figures showed it was vital to promote safe sex.
Rates of HIV have been rising in recent years with latest figures showing cases among men who have sex with men (MSM) in the UK reaching an all-time high.
A recent report from the HPA found that nearly half of the 6,280 people diagnosed in the UK in 2011 were MSM.
Overall, one in 20 MSM are infected with HIV.
For this study, researchers analysed data from 1990 to 2010. They concluded that, without the introduction of anti-retroviral drugs to treat those with HIV, infections would be 68% higher in MSM.
Therapy with anti-retrovirals lowers the risk of people with HIV infecting others.
The report suggested the incidence of HIV could be 32% lower if all anti-retroviral treatment were prescribed from the moment of diagnosis rather than when health declined.
Further analysis showed that, if all MSM had stopped using condoms from 2000, rates of HIV in this group would now be 400% higher, the journal PLoS One reported.