US Secretary of State Hillary Clinton on Wednesday gave South Africa greater control over its AIDS programme, which Washington has spent $3.2 billion ramping up over the last eight years.
US aid began in 2004, when South Africa was an international pariah for then president Thabo Mbeki's refusal to accept that AIDS was caused by a virus. His health minister advocated beetroot and garlic instead of medication for treatment.
Now the country runs the world's largest AIDS treatment programme, with more than 1.2 million people currently receiving medication. About 5.7 million, or more than one in 11 South Africans, have HIV -- more people than in any other country.
"South Africa and the entire region has a brighter and healthier and more secure future," Clinton said while visiting a clinic in the Cape Town township of Delft.
"Even as we take a moment to say 'well done', we cannot make the mistake of thinking that our job is done," she said. "The disease is still very dangerous."
Currently the United States funds an array of programmes and clinics directly. Under the new arrangement, South Africa will gradually take over management of those programmes and patients will be shifted into the public health system.
"Some people may hear 'South Africa is in the lead' and think that it means that the US is bowing out," Clinton said. "Let me say this clearly: the US is not going anywhere."
"The partnership is changing for the better," she said. "Our goal is no new patients -- zero."
"South Africa will become the first country in Africa to plan, manage and pay for more of your own efforts to combat the epidemic," Clinton said in a speech later in the day. "The United States will continue to provide funding and technical support through our PEPFAR programme."
The change to the South African programme comes as the United States grapples with its own budget issues at home. AIDS activists have already voiced concern about possible cuts to PEPFAR, credited with transforming treatment in poor countries.
As the richest country in Africa, South Africa has far more resources than any of its neighbours to combat the disease.
According to UN data, the United States provides almost half the world's funding for AIDS assistance -- mainly through PEPFAR, the President's Emergency Plan for AIDS Relief.
That has helped bring about dramatic changes in hard-hit countries like South Africa, where Clinton cited a litany of success.
The rate of newborns catching HIV from their mothers during childbirth has fallen from 8 percent in 2008 to 2.7 percent last year.
More than 6.8 million South Africans have undergone HIV testing and counselling, and 556,000 orphans have received care through the scheme.
Clinton has been on an African tour since July 31, having already visited Senegal, Uganda, South Sudan, Kenya and Malawi. On Thursday she heads on to Nigeria, Ghana and Benin.
Clinton has repeatedly advocated "partnerships" with Africa, hoping to lure countries attracted by China's massive investment across the continent, which has drawn accusations that Beijing is seeking mainly to extract resources to feed its own growing economy.
She urged South Africa to follow the legacy of its first black president Nelson Mandela, who led the transition from white-minority rule 18 years ago.
"The man who did so much to shape the history of a free South Africa has never stopped thinking about the future of South Africa," she said.
"That is the true legacy of president Mandela -- calling all of us to complete the work he started. To overcome the obstacles, the injustices, the mistreatments that everyone, every one of us will encounter at some point in our lives."
Explore further: South Africa unveils plan to halve HIV infections