The global fight against AIDS is stalling due to lower investment, marginalized communities missing vital health services, and new HIV infections rising in some parts, the United Nations warned on Tuesday.

More than half of all new HIV infections in 2018 were among sex workers, drug users, men who have sex with men, transgender people, prisoners and the sexual partners of these groups, according to a report by UNAIDS. Many of those populations did not get access to infection prevention services, it said.

Progress in some countries has been "impressive," the U.N. body's report said, but others are seeing rising numbers of HIV infections and AIDS-related deaths.

It noted "worrying increases" in new infections in eastern Europe and central Asia, where HIV cases rose by 29 percent, as well as in the Middle East, North Africa and Latin America.

"Ending AIDS is possible if we focus on people not diseases," said UNAIDS Executive Director Gunilla Carlsson.

She said now was the time to "create road maps for the people and locations being left behind (and) take a human rights-based approach to reaching people most affected by HIV."

This would need greater political leadership, she said, starting with adequate and well-targeted investment.

Global funding for the AIDS fight dropped off significantly in 2018 - by nearly $1 billion - as international donors gave less and domestic investments did not grow fast enough to plug the gap. Around $19 billion was available for the AIDS response in 2018, UNAIDS said - falling $7.2 billion short of the total $26.2 billion it says is needed by 2020.

Globally in 2018, some 770,000 people died of AIDS and almost 38 million people were living with the human immunodeficiency virus (HIV) that causes it.

HIV cannot be cured but the infection can be kept in check by AIDS drugs known as antiretrovial treatment.

Around 23.3 million of the 37.9 million people with HIV worldwide currently get the AIDS drugs they need.

Around 1.7 million people were newly infected, the UNAIDS report said, a 16% decline since 2010, driven mostly by steady progress in parts of eastern and southern Africa.

South Africa, for example, has cut new HIV infections by more than 40% and AIDS-related deaths by around 40% since 2010.

But the report warned there is still a long way to go in many parts of eastern and southern Africa - the regions most affected by HIV.

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM