About a dozen countries hit hard by AIDS have reached a “tipping point” that means they are winning their battles against the disease, according to a new analysis.

However, the world as a whole — and Africa in particular — is still losing the fight.

The analysis, by AVAC, an organization that lobbies for AIDS prevention and treatment, is simple in design: It compares the number of people in each country who are newly infected with H.I.V. each year to the number of infected being put on treatment for the first time. The ratio shows whether that country’s epidemic is growing or shrinking.

“There’s all this talk about ending AIDS,” said Mitchell Warren, AVAC’s executive director. “We wanted to find a mechanism that could chart the progress over time, and use it as a management tool, and to make comparisons between countries that are doing the right things and the others.”

Rwanda, Botswana and several other African countries are now in the “winning” column, as is Haiti. South Africa, which has more infected people than any other country, is also among the winning countries.