South Africa has witnessed an "unparalleled" five-year increase in life expectancy since 2005 thanks to the world's biggest programme of HIV/Aids drug treatment, researchers say.

The trend marks a spectacular reversal from when former president Thabo Mbeki was branded an "Aids denialist" whose dogma was blamed for 330,000 deaths. In a few short years, South Africa has gone from global disgrace to shining example.

It is also a rare shaft of light for President Jacob Zuma and his government, recently besieged by violent industrial unrest, scandals over corruption and frustration over failing schools and a dearth of jobs.

Professor Salim Abdool Karim, president of the South African Medical Research Council, said the rise in life expectancy – from 54 years in 2005 to 60 in 2011 – was of the order usually only seen after a major societal shift, such as the abolition of slavery.

In this case, the catalyst was the industrial scale distribution of antiretroviral (ARV) drugs by the public health sector, greatly reducing deaths among people in their 30s.

In 2005, under Mbeki and health minister Manto Tshabalala-Msimang – who promoted a "treatment" of beets and garlic – only 133,000 patients were on ARVs. Now the total stands at 1.9m, the biggest programme on the planet.

Aids-related deaths decreased from 257,000 in 2005 to 194,000 in 2010, according to the Actuarial Society of South Africa. The rate at which HIV-positive mothers transmitted the virus to their babies decreased from 8.5% in 2008 to 2.7% in 2011.

A national HIV counselling and testing campaign that was launched two years ago has notched 20m HIV tests in 20 months. South Africa has increased its domestic expenditure on Aids to $1.6bn, the highest by any low- and middle-income country.

The advances were hailed by the medical journal the Lancet, in a paper co-authored by Karim. "The rapid transition from the failed stewardship of ex-president Thabo Mbeki and the disastrous policies of his health minister, Mantombazana Tshabalala-Msimang, to the leadership shown by the present health minister, Aaron Motsoaledi, and his team could not have been more striking

The mood is very different from when Karim and colleagues began their research, he said . "Three years ago there were really doom and gloom stories about how bad things were and how we were going in the wrong direction. Now it's so refreshing to write a positive story.

"There has been a dramatic turnaround in mortality. The increase in life expectancy is unparalleled: to get 10% is unheard of. You have to have a huge change in society. It's tantamount to the abolition of slavery."

At last, Karim added, he can meet international counterparts with his head held high. "I'm proud to be a South African, I'm proud of this administration. I used to go to meetings and people would say sorry about all the problems and the denialist president. Now I can talk to them about our achievements. That's what we want to be known for as a country."

South Africa's first democratically elected president, Nelson Mandela, was slow to address the Aids crisis during the 1990s. But he later took a courageous stand against his own party, visiting a township and donning an "HIV positive" T-shirt ahead of an African National Congress (ANC) conference. In 2005 his public acknowledgment that his son had died from Aids boosted efforts to fight it.

Edwin Cameron, a gay, HIV-positive judge at the constitutional court, said the crucial turning point came 10 years ago when the court ruled against Mbeki and in favour of a massive civil society campaign to make ARVs available. It came at exactly the right time, he added, as global pressure was forcing pharmaceutical companies to reduce prices.

The latest statistics make Cameron both "elated and hopeful", he said. "Elated because 10 years ago it seemed millions and millions of deaths were inevitable. Hopeful because of the science: we didn't think this whole problem could be slain as readily as it's being done." The signs of progress against Aids come at a time when South Africa needs all the good news it can get.

Cameron, who began his own ARV treatment 15 years ago, added: "While people are downcast after Marikana [mine massacre] and the slowing economy, I think Aids point to a public service achievement and shows we can do it if we put our minds to it."

The scourge is far from beaten, however. HIV prevalance has remained static – it is around 30% among pregnant women. Unsafe sex is still widely practised and in 2009 there were on average 935 new HIV infections every day. Campaigners are especially critical of the creaking public health system for shortages and low quality.

Mark Heywood, executive director the pressure group Section 27, compared the problem to South Africa's beleagured schools. "If expanded access to ARVs is not accompanied by an improved quality of care, ultimately the object of access, life and dignity, will be defeated," he said.

"In late 2012, three years into the Zuma presidency, the ARV programme is one of the few matters about which the Zuma administration can boast. But it is becoming clearer that improved access may be associated with a deteriorating quality of care.

"This is not – as conservative public health experts would argue – because expanding access automatically undermines quality; it does not. Rather it is because there has not been a political commitment in parts of the government beyond or out of the control of the minister of health, to ensure that access is accompanied by quality. As with so many things in South Africa, it's a superficial numbers game – not a dignity and equality game."