Condom use in sub-Saharan African countries has decreased and was hindering the United Nations target of cutting new HIV infections among adults by 50%.
A report by the Joint United Nations Programme on HIV/Aids (Unaids) found that while the number of new cases of HIV fell, there has been a trend in some high-risk countries towards less reliance on condoms.
"Although trends in sexual behaviours in high-prevalence countries have generally been favourable over the last decade, recent surveys in several countries in sub-Saharan Africa have detected decreases in condom use and/or an increase in the number of sexual partners," said the report.
"Efforts to reduce transmission related to sex work and men who have sex with men remain insufficient as evidenced by recent trends in prevalence among these groups."
The report showed 35.3 million people were living with HIV in 2012 and that globally, 2.3 million became newly infected, down from 3.4 million in 2001.
It said that the world was not on track to reduce HIV transmission among people who inject drugs.
"HIV prevalence among people who inject drugs remains high - up to 28% in Asia. HIV prevention coverage for people who inject drugs remains low, with only two of 32 reporting countries providing the recommended minimum of at least 200 sterile syringes per year for each person who injects drugs.
"Among 35 countries providing data in 2013, all but four reached less than 10% of opiate users with substitution therapy. In addition to exceptionally low coverage, an effective Aids response among people who inject drugs is undermined by punitive policy frameworks and law enforcement practices, which discourage individuals from seeking the health and social services they need."
New HIV infections among children have been reduced by 51% since 2001, with 260 000 new cases last year. Aids-related deaths have fallen by 30% since their peak in 2005.
By the end of 2012, almost 10 million people in low and middle income countries had access to antiretroviral therapy - up by 20% in just one year.
"Not only can we meet the 2015 target of 15 million people on HIV treatment-we must also go beyond and have the vision and commitment to ensure no one is left behind," said Michel Sidibé, executive director of Unaids.
In his report foreword, he added: "This report highlights continued progress towards the global vision of zero new HIV infections, zero discrimination and zero AIDS-related deaths. The annual number of new HIV infections continues to decline, with especially sharp reductions in the number of children newly infected with HIV.
"More people than ever are now receiving life-saving antiretroviral therapy, contributing to steady declines in the number of Aids-related deaths and further buttressing efforts to prevent new infections.
"However, this report also includes notes of caution, as well as signs of stagnating progress towards other targets and elimination commitments in the 2011 UN Political Declaration. In several countries that have experienced significant declines in new HIV infections, disturbing signs have emerged of increases in sexual risk behaviours among young people.
"Stigma and discrimination remain rife in many parts of the world, and punitive laws continue to deter those most at risk from seeking essential HIV services.
"These challenges are real, and they must be taken seriously if countries are to achieve their Aids targets. However, the enormous progress that this report describes highlights the undeniable fact that the Aids response has encountered - and overcome - such challenges in the past."