Amid mounting concern that progress in fighting the global AIDS epidemic is stalling, campaigners were given a boost from a surprising quarter this week.

Confounding expectations, South Africa — home to the world’s largest population of people living with HIV — has recorded a significant decline in the number of people contracting the virus.

A major national survey conducted by the Human Sciences Research Council, South Africa’s main official statistician, found that the number of new HIV infections had dropped by 44 percent since the last major study in 2012.

The findings came as UNAIDS, the body set up by the United Nations to tackle the epidemic, warned that a global effort to bring the disease under control was “slipping off track”.

In its latest report, also published this week, UNAIDS warned that although fewer people were dying, thanks to a rise in treatment rates, the fight against HIV was at a “precarious point” because progress in cutting new infections internationally has slowed.

“The success in saving lives has not been matched with equal success in reducing new HIV infections,” Michael Sidibe, executive director of UNAIDS, said. “New HIV infections are not falling fast enough.”