When the South African government announced a national lockdown to fight the COVID-19 pandemic in late March, an unexpected clause was added: a complete ban on alcohol sales.

Critics swiftly denounced it as puritanical. Bootleggers sprang into action. Mobs looted liquor stores. Economists fretted about the lost tax revenue, and some South Africans began brewing pineapple beer at home.

But while the outrage grew, hospitals were counting the benefits. They recorded 23,000 fewer weekly admissions to their trauma units after the lockdown, a two-thirds decline – and researchers estimated that about 40 per cent of this decline was due to the alcohol ban, which has reduced everything from car accidents to stabbings and shootings.

Story continues below advertisement

With cases of COVID-19 still climbing daily, the freed-up hospital beds that stemmed from the alcohol ban have been valuable in protecting South Africa’s fragile health system and preventing the severe strains that have overwhelmed the hospitals of many wealthier parts of the world.

South Africa’s response to the pandemic has often been heavy-handed or inept, hindered by budget shortages and weakened by inconsistencies and excesses. But on balance, the country has found creative ways to moderate the spread of the virus, safeguard its health system and cushion the economic blow.

For a developing-world country – already struggling with soaring deficits, high unemployment and widespread poverty before the pandemic struck – it has been a particularly impressive response, even though the government knew it would face a backlash for the alcohol ban and other unpopular measures such as a ban on outdoor exercise.

The biggest weakness in its initial response was the lack of support for the poorest families who were losing their jobs or their daily income in the informal sector as a result of the lockdown. Many were desperate for help. To address that crisis, President Cyril Ramaphosa announced on Tuesday that his government would provide an unprecedented $37-billion support package – equal to almost 10 per cent of the country’s GDP.

Story continues below advertisement

The support includes $3.7-billion in direct monthly grants to the neediest groups such as low-income women with children, the elderly and the unemployed, with the grants continuing for six months. Social-justice groups and economists have praised the government for sending cash directly to the most vulnerable.

South Africa’s bold health measures have been equally lauded. Rather than waiting for COVID-19 cases to flood into the hospitals and overwhelm the system, the government has deployed about 30,000 health workers to visit communities door-to-door and screen people for signs of the coronavirus.

Anyone with a symptom such as fever or shortness of breath is sent for full testing. South African scientists believe it is the world’s only such national screening system, allowing an aggressive search for the virus across an entire country.

So far, more than two million South Africans have been screened for symptoms, often at mobile units or makeshift clinics on the streets, using many of the same public-health workers who have worked on HIV and tuberculosis campaigns in a country that has among the world’s highest rates of both diseases.

Story continues below advertisement

South Africa responded to the pandemic at a relatively early stage in its trajectory, shutting down international travel and then announcing a national lockdown just three weeks after the first case of the coronavirus had been detected in the country, and before the first death.

“It was a masterstroke,” said Mark Heywood, a long-time social-justice activist on HIV and other health issues.

As a result, South Africa has managed to reduce the daily growth rate of COVID-19 cases. In March, cases were rising by 30 to 40 per cent daily. After the lockdown, and about two weeks after the shutdown of international travel, South Africa was able to eliminate its imported cases and reduce local transmission. This month, the daily growth rate has been less than 10 per cent – just 5 or 6 per cent on most days.

Using the community screening process, South Africa has sharply expanded its testing for the virus, conducting nearly 134,000 tests so far. On a typical day this week, it has tested 6,000 to 7,000 people.

Story continues below advertisement

Of those, only about 3 per cent have been found to have the virus, which suggests that its spread in the communities is still relatively low. Michael Ryan, health emergencies director at the World Health Organization, said this week that the South African combination of widespread testing and a low percentage of positive results is an “incredible” performance.

Experts still believe that South Africa is likely to be hit with exponential growth in virus cases later this year, but it has bought enough time to allow its hospitals and health systems to prepare for a potential flood of cases in the future. The total number of confirmed cases was 3,635 as of Wednesday, with 65 deaths.

“What we have managed to do is to delay the exponential curve,” said Salim Abdool Karim, an epidemiologist and infectious diseases expert who heads a team of 50 scientists who are advising the government on the pandemic.

At a briefing last week, Dr. Karim said the lockdown and other measures “have slowed the viral spread, the curve has been impacted and we have gained some time.” The peak of the pandemic might now be lower, he said.

Mr. Ramaphosa is scheduled to address the country on television on Thursday and he is expected to announce plans for a partial lifting of the lockdown.