Africa has defied predictions that covid-19 would rip through the slums of its crowded cities, killing hundreds of thousands of people. a combination of good policy and good luck means that most of africas 54 countries have so far avoided the worst of the pandemic. about 17 per cent of the global population lives in africa. yet the death toll from covid-19, at just over 35,000, is about 3.5 per cent of the worldwide count.

Not all of africa has got off lightly. south africa alone has recorded 16,400 deaths, nearly half of all those on the continent. north african states such as egypt and algeria have also been hit relatively hard, suggesting that colder countries may be worse affected. in south africa, the tally of excess deaths indicates the official covid-19 death toll may underestimate true numbers.

Yet the worst seems to be over, for now at least. as south africa moves into summer, new infections are sharply down. across the continent, both infection rates and deaths also appear to be falling. it is true that only 13m africans have been tested, not enough for a full picture. there are many more undetected cases. serological tests suggest that more than 80 per cent of people infected in africa are asymptomatic.

Part of the credit for the relatively low death toll goes to the early response by most african governments. many, drawing on knowledge of previous epidemics such as ebola, were screening at airports in early february and tracking down imported cases aggressively. south africa and rwanda declared full lockdowns in mid-march before any deaths had been recorded. other countries stopped short of that. but most with only a few exceptions adopted a patchwork of measures: closing schools, banning mass gatherings, imposing curfews and mounting aggressive public health campaigns.

These policies were effective in limiting the number of early cases and slowing covid-19s spread. but africa has undoubtedly benefited too from being the worlds youngest continent. it has a median age of below 20, and only about 3 per cent of people are over 65. early concerns that malnourishment and the prevalence of other diseases might offset this advantage appear wrong. if anything, experts now speculate that exposure to other microbes might make some africans less susceptible to coronavirus.

Given these factors, some people have criticised the african response as too severe. governments, this argument goes, should not have copied the west by imposing lockdowns. the collateral damage in terms of untreated malaria and hiv and of unvaccinated children and mothers unattended in childbirth outweighs the covid-19 deaths saved, the critics say.

To be sure, there will be unintended consequences of anti-pandemic measures; africa is hardly unique here. but the criticism is unfair. first, it is a rule of public health policy that it is better to overreact than do too little. second, african governments have been pragmatic, with most seeking to balance the risks posed by covid-19 with the need to keep normal economic and healthcare activity going as much as possible.

Indeed, this is the dilemma that policymakers now face. however well the continent has done so far, it is too early to relax. as africa opens up, it is imperative that governments prevent new imported cases. they also need to stick to social-distancing measures wherever possible. as cyril ramaphosa, south africas president, put it recently, having weathered the first assault, the last thing africa needs now is a second wave.