Archbishop Desmond Tutu has called for homosexuality to be decriminalised to help tackle HIV.
His comments come in an analysis in The Lancet journal of why incidence of the virus continues to grow among men who have sex with men.
Dr Tutu said anti-homosexuality laws would in the future be seen as “wrong” as apartheid laws are now.
Campaigners said it was important for community leaders to speak out.
The archbishop is patron of the Desmond Tutu HIV Foundation, based in Cape Town, which provides treatment for HIV and carries out research.
Writing in The Lancet, he said: “In the future, the laws that criminalise so many forms of human love and commitment will look the way apartheid laws do to us now – so obviously wrong.
“Never let anyone make you feel inferior for being who you are. When you live the life you were meant to live, in freedom and dignity”.
Also writing in The Lancet, an international team of researchers, led by Prof Chris Beyrer of the Johns Hopkins Bloomberg School of Public Health in the US, said men who have sex with men (MSM) bore a “disproportionate burden” of HIV.
The fact HIV was first identified in gay men has “indelibly marked the global response” and “stigmatised those living with the virus”, they said.
The researchers’ paper said there was optimism among HIV specialists about the potential to use prevention, such as the drug Truvada, to reduce levels of HIV in men who have sex with men.
Earlier this week, the US Food and Drug Administration approved Truvada for preventative use in those at high risk of infection and who may engage in sexual activity with HIV-infected partners, the first time it has approved a drug to prevent HIV infection.
‘Struggle for equity’
But the international team said the picture was very different in many other countries.
“In too many settings in 2012, MSM still do not have access to the most basic of HIV services and technologies such as affordable and accessible condoms, appropriate lubricants and safe HIV testing and counselling,” they said.
“The struggle for equity in HIV services is likely to be inseparably linked to the struggle for sexual minority rights—and hence to be both a human rights struggle, and in many countries, a civil rights one.”
The paper, published on the eve of the international Aids 2012 conference, adds that by the end of 2011, only 87 countries had reported prevalence of HIV in MSM.
Data is most sparse in the Middle East and Africa, where homosexual activity is a criminal offence.
The researchers call for same-sex relations to be decriminalised in all countries, so that a true picture of the scale of HIV in men who have sex with men can be ascertained.
A spokeswoman for the UK’s Terrence Higgins Trust said: “We’ve got to have community leaders and people with influence speaking out.
“That’s why what Desmond Tutu is saying is so important.”
And she said it was right to focus efforts on men who have sex with men, in all countries.
She added: “In London, one in seven gay men has HIV.”