Cyril Ramaphosa has imposed a 21-day total lockdown on the 56 million inhabitants of South Africa, telling them in an address that the unprecedented and sweeping measures were necessary to avoid a “catastrophe of huge proportions”.

The lockdown will come into effect on Thursday night and be enforced by the police and the army, the president told the nation on Monday.

The number of coronavirus cases in South Africa has risen steeply in recent days, going from 61 to more than 400 in just over a week.

“The numbers will continue to rise. It is clear that ... we need to urgently and dramatically escalate our response,” Ramaphosa said, raising the prospect of tens of thousands or, “within a few weeks”, hundreds of thousands of cases if nothing was done.

International flights to some major airports have been suspended and strict new quarantine regulations will be imposed.

South Africa declared a national disaster last week, closed schools and called for social distancing. But the measures were clearly seen as insufficient to stem the spread of the disease in Africa’s most developed nation.

Though South Africa has a young population, there are millions who are vulnerable because of HIV or malnutrition. The healthcare system has long suffered an acute lack of resources and critical facilities are extremely limited.

Ramaphosa said he was aware that the cost to South Africa’s already flagging economy would be very high, with huge numbers of jobs likely to be lost, but said that the “human cost of delaying this action would be far greater”.

A short list of key workers will be exempt from the lockdown, which was widely anticipated after military vehicles appeared in major cities during the afternoon.

Ramaphosa, a former labour activist turned tycoon who took power in 2018 and won an election last year, also announced an increase in screening and testing for the disease, and the establishment of a solidarity fund. A package of economic measures to protect credit, banking, businesses and jobs, as well as support those without formal incomes, was announced.

Measures to combat the corruption that has plagued the ruling African National Congress party will also be implemented to ensure funds reach deserving recipients.

“In the days and weeks and months ahead, the unity of our nation will be put to the test as never before,” Ramaphosa said. “Let us never despair. We are surely going to prevail.”