The number of people dying of AIDS around the world declined last year for the third year in a row, at the same time that the fraction of people getting treatment for the infection reached almost 50 percent.

Both facts are evidence that progress against the 30-year-old epidemic is gaining momentum, according to the United Nations’ annual report on the global AIDS epidemic, released Monday.

“Even in this time of financial crisis and a flattening of resources, we are seeing results,” said Michel Sidibe, director of UNAIDS, headquartered in Geneva. “Many things happened in 2011, and I think we can start thinking about the beginning of the end of the epidemic.”

The biggest advances have occurred in sub-Saharan Africa, where a massive rollout of antiretroviral drugs, increasing acceptance of male circumcision and changes in sexual behavior are driving new cases of infection to the lowest number in years.

However, because of the longer survival of infected people, the number living with AIDS around the world won’t fall for years. Last year, it stood at 34 million, up from 32.9 million in 2009 and an all-time high.

Perhaps the most dramatic achievement of 2010, the report says, was a 20 percent increase in the use of “antiretroviral therapy” in Africa over the prior year. A decade ago, the life-extending drugs were available in Africa only to members of the elite and a few ordinary people enrolled in clinical studies.

Today in low- and middle-income countries around the world, 47 percent of people who meet the clinical criteria for antiretroviral therapy are getting it — 6.6 million out of 14.2 million eligible. Much of that treatment is underwritten by the U.S. government through the President’s Emergency Plan for AIDS Relief, started by George W. Bush, and by the Global Fund to Fight AIDS, Tuberculosis and Malaria, a charity principally funded by the United States and European countries.

Globally, about 2.7 million people became infected with HIV last year. That was 21 percent fewer than the number of new infections at the peak of the epidemic in 1997. (The decline has been even steeper in Africa.) Global AIDS mortality in 2010 was 1.8 million people, down from a peak of 2.2 million in 2006.

The big exception to the global trend is in the countries of the former Soviet Union and in Central Asia, where there has been a 250 percent increase in people with HIV from 2001 to 2010. Most of the infections there arise from intravenous drug use and male homosexual activity.

Part of the reason for the increase, according to the U.N. report, is that governments aren’t paying attention to the right risk groups. In Russia, of the $181 million spent on HIV prevention in 2008, only $8 million was directed to IV drug users, male homosexuals or commercial sex workers.

“In Russia, the resources just don’t go to the right interventions,” said Bernhard Schwartlander, UNAIDS’s chief epidemiologist.

In Africa, changes in sexual behavior — use of condoms, reduction in the number of sexual partners and a delay of the start of sexual activity — have been responsible for driving HIV incidence lower. The percentage of young men reporting multiple partners in the previous year fell in 11 of 19 African countries studied, and the fraction of boys and girls reporting sex before age 15 fell in eight.

This year, a study conducted mostly in Africa showed that when an HIV-infected person is on antiretroviral treatment, the chance of transmitting the virus to a sexual partner is reduced by 96 percent. That is because the drugs dramatically lower the amount of virus in blood and other body fluids.

That finding has led some to call for even greater investment in AIDS treatment in low-income countries with an eye toward controlling the disease and its economic burden. Today, about $16.6 billion a year is spent on AIDS, with slightly more than half of that money spent by the governments of low- and middle-income countries and the patients in them.

“Not only can we break the back of the epidemic, we can bend the cost curve,” Schwartlander said.

A look at three countries — Zimbabwe, Lesotho and Botswana — suggests that AIDS treatment is a tool for AIDS prevention.

All three countries showed a reduction in new infections since 1995 attributable to changes in sexual behavior. That decline in risky behavior leveled off in the past decade (and has increased somewhat in Lesotho), but AIDS incidence is once again falling. That is apparently the consequence of bringing treatment to hundreds of thousands of people.

The number of infections caused by mother-to-child transmission of the virus peaked in 2002 at 560,000 but fell to 390,000 last year as more infected women took antiretroviral drugs during their pregnancy and while breast feeding. Pregnant women’s use of the more expensive combination of drugs might have prevented 70,000 more infections, according to the report.