The United States and South Africa are to sign an agreement on funding for an anti-AIDS campaign that is symbolic of Pretoria's shift from being a pariah to a global player in fighting the disease.

U.S. Secretary of State Hillary Clinton said during a visit to South Africa that Pretoria will begin taking more of the responsibilities for its HIV/AIDS program, part of a broader effort to overhaul the U.S. global plan for AIDS relief launched under former President George W. Bush.

"South Africa is taking the lead, and I want publicly to commend your minister of health and his associates who are widely being given great admiration around the world for the success of their efforts," Clinton told a news conference.

The United States limited access to HIV/AIDS funding to the government of former President Thabo Mbeki, whose administration was ridiculed for denying there was a link between HIV and AIDS while prescribing meaningless treatments such as beet root instead of internationally proven medicines.

President Jacob Zuma, who took office in 2009, put policies in line with global research, strengthened campaigns to provide nationwide the anti-retroviral drugs that control HIV and has slowed an infection rate that ranks among the world's highest.

On Wednesday, Clinton is expected to sign a deal to rework South Africa's programs under what is known as "The President's Emergency Plan for AIDS Relief" (PEPFAR), allowing the government to better use the funding in its fight against the virus.

U.S. officials said South Africa will be the first PEPFAR country to begin to "nationalize" its program, but others would be expected to follow as their capacities increase and the United States seeks to more effectively target its overseas assistance in an atmosphere of budget austerity at home.

The United States has spent $3.2 billion since 2004 on anti-AIDS programs in South Africa, where 5.7 million people are infected - or close to 18 percent of the adult population.

It has budgeted $460 million for South Africa under PEPFAR in 2013, but U.S. officials say that amount is expected to gradually drop in the coming five years.

"South Africa over the next decade will be committing more of its own public health funds to deal with people with HIV," a senior U.S. official travelling with Clinton's party said.

South Africa says about 1.7 million are now on treatment and the rate of mother-to-child transmission has dropped from 8 percent in 2008 to 2.7 per cent in 2011.

But complicating the situation is a high incidence of HIV/AIDS among workers in the mining sector, which employs about 500,000 people living and working in cramped conditions that facilitate the spread of tuberculosis, a disease marching in step with HIV.

Drug resistant TB strains are spreading among miners, who have infection rates about three times higher than the general population, according to South African officials.

The disease is further spread when foreign-born miners - tens of thousands from Lesotho, Swaziland and other neighboring countries working in South Africa's mines - return home.