Palesa Morudu is a writer and a director at Clarity Global Strategic Communications based in Washington.

When the novel coronavirus hit South Africa in early March, there were reasons to fear the worst. The world’s most unequal country had been severely affected by both the Spanish flu and the HIV/AIDS pandemics. But with this history in mind, South Africa launched one of the most vigorous public health responses on the African continent.

Over the past five weeks, Pretoria has taken rigorous measures to “to flatten the curve” with aggressive testing and screening and by preparing health centers. The government deployed 28,000 health workers to test and screen communities across the country, drawing on the health infrastructure that had been built in response to the HIV/AIDS pandemic.

As of this week, 6.1 million people had been screened and 207,530 tested for covid-19, with 5,647 active coronavirus cases, 2,073 recoveries and 103 deaths. So far, South Africa appears to be on course to flatten the curve far earlier than the United States and many other countries.

These measures were accompanied by an extreme lockdown. Except for essential grocery shopping and medical visits, people were prohibited from going to work (apart from essential services personnel), exercising outdoors, walking their dogs and buying cigarettes or alcohol. The police and army have controlled access to public spaces and the streets — and often enforce these restrictions with gratuitous brutality. The lockdown is set to ease marginally on Friday — the first in a five-stage relaxation.

What has informed South Africa’s covid-19 response? This is the third major pandemic or epidemic of this kind to hit the southern tip of Africa in just over 100 years. During the 1918-19 influenza pandemic, which claimed an estimated 50 million lives globally, South Africa had the fourth-highest mortality rate in the world. According to University of Cape Town historian Howard Phillips, during the second wave of the pandemic in 1918, between 300,000 and 350,000 South Africans died — an estimated 6 percent of the country’s population.

The flu arrived in Cape Town on warships carrying South African troops returning from European battlefields via the port of Freetown, Sierra Leone, where they contracted the virus. After showing no symptoms two days into their quarantine, the men were let go and began returning to their homes. In a matter of days, “Cape Town was a stricken city,” according to media reports. Phillips estimates that the flu laid low up to 60 percent of the country’s population, with the “complete paralysis of every activity in the country.”

When the flu broke out, the central government’s public health department was staffed by all of three people. The burden of care and treatment fell heavily on local authorities. This experience led to legislation that created the country’s first national public health structure.

In a cruel twist of history, the second major pandemic intensified just as South Africa was ending decades of white-minority rule. By the time Nelson Mandela became the country’s first democratically elected president in 1994, HIV/AIDS had begun to infect large numbers of people — and South Africa soon became the epicenter of the HIV/AIDS scourge. AIDS-related illnesses claimed an estimated 2.8 million lives between 1997 and 2010 — a trend fueled in large part by the refusal of former president Thabo Mbeki to yield to science and to accelerate the distribution of lifesaving antiretroviral drugs.

According to UNAIDS, 7.7 million South Africans are currently living with HIV. Such a large number of people with compromised immune systems, combined with close living quarters and crowded transport in urban and rural townships, provides fertile ground for the spread of the novel coronavirus.

These considerations have loomed large in the public health response since the first coronavirus cases were detected in early March, as President Cyril Ramaphosa announced a national state of disaster, banned international travel and prohibited gatherings of more than 100 people on March 22, and ordered a strict national shutdown 10 days later.

While it is too early to declare victory, South African medical experts are cautiously optimistic that the country acted with sufficient speed and determination to get ahead of the curve. The key factor seems to have been that the government listened to scientists and allowed them to lead the public health response.

Yet there have also been serious problems with South Africa’s approach. The economic freeze has increased hunger and hardship. And the state has let loose the army and police with few restrictions. The United Nations names South Africa as one of the countries with the worst cases of police brutality during the global lockdowns.

So, while the South African government has admirably learned from history, it has a lot more studying to do. Addressing mass poverty and unemployment and improving public health will require the kind of development that does not emerge from the end of a police baton.

Read more: