AIDS claimed a million lives in 2016, almost half the 2005 toll that marked the peak of the deadly epidemic, said a UN report Thursday proclaiming "the scales have tipped".
Not only are new HIV infections and deaths declining, but more people than ever are on life-saving treatment, according to data published ahead of an AIDS science conference opening in Paris on Sunday.
Experts warned, however, that much of the progress can be undone by growing resistance to HIV drugs.
Unless something is done, drug-resistant virus strains may infect an extra 105,000 people and kill 135,000 over the next five years, and boost treatment costs by $650 million (560 million euros), said the World Health Organization (WHO).
According to a UNAIDS global roundup, 19.5 million of 36.7 million people living with HIV in 2016 had access to treatment.
This marked the first time that more than half of infected people were receiving anti-retroviral treatment, which rolls back the AIDS virus but does not completely eliminate it.
"We could get 2.4 million new people on treatment" in 2016, UNAIDS Executive Director Michel Sidibe told journalists in Paris. "We are saving lives."
The report said AIDS-related deaths have fallen from 1.9 million in 2005 to one million in 2016, adding that "for the first time the scales have tipped."
The year 2016 saw 1.8 million new infections, almost half the record number of some 3.5 million in 1997, said UNAIDS.
In total, 76.1 million people have been infected with HIV, the virus that causes AIDS, since the epidemic started in the 1980s. Some 35 million have died.
"Communities and families are thriving as AIDS is being pushed back," said Sidibe.
"As we bring the epidemic under control, health outcomes are improving and nations are becoming stronger."
As yet, there is no HIV vaccine or cure, and infected people rely on lifelong anti-retroviral therapy to stop the virus replicating.
Without treatment, HIV-infected people go on to develop AIDS, a syndrome that weakens the immune system and leaves the body exposed to opportunistic infections such as tuberculosis, and some types of cancer.
Treatment carries side effects and is costly, but allows infected people to be healthier for longer.
'More work to do'
Most progress has been made in east and southern Africa, the region that was hardest hit by the epidemic and where many interventions were focused.
Since 2010, AIDS-related deaths in the region declined by 42 percent. The region accounts for half the world's infected population, with women and girls disproportionately affected at 60 percent.
Sixty percent of all people who receive anti-retroviral therapy live in east and southern Africa which, along with west and central Europe and the Americas, is on target to meet the so-called 90-90-90 targets set by the UN, said the report.
By 2020, states the plan, 90 percent of infected people must know their status, of whom 90 percent must be on treatment. In 90 percent of those, the virus will be "suppressed" by medicine to the extent that it cannot function or replicate.
By 2016, 70 percent of infected people knew their status, said the new report. Of those, 77 percent were on treatment, and 82 percent had virus suppression.
UNAIDS expressed concern about two regions with worsening AIDS trends: the Middle East-North Africa, and eastern Europe-central Asia.
Both are areas marred by conflict and political uncertainty, and where stigma helps to drive HIV infection underground, making it even more difficult to combat.
New HIV infections rose by 60 percent in eastern Europe and central Asia, and deaths by almost a third from 2010 to 2016.
In the Middle East and North Africa, the number of AIDS deaths increased by a fifth in the last six years.
"Globally, progress has been significant, but there is still more work to do," the authors said in a statement.
"Around 30 percent of people living with HIV still do not know their HIV status, 17.1 million people living with HIV do not have access to anti retroviral therapy, and more than half of all people living with HIV are not virally suppressed."
Of the total infected population, over two million were children younger than 15, said UNAIDS. Only 43 percent of them were on treatment.
New infections among children almost halved from 300,000 in 2010 to 160,000 last year, said the report.
This was partly due to more and more HIV-infected pregnant women -- 76 percent in 2016 -- having access to drugs blocking virus transmission to their offspring.