NAIROBI — As South Africa's 57 million people entered a three-week lockdown on Friday and took stock of a stark new reality, the country's Health Ministry announced its first coronavirus-related death and said known cases have topped 1,000 — a first on the African continent.

South Africa is the only African country to have tested extensively, administering more than 20,000 tests since the first case, and the growing number of positive results put pressure on President Cyril Ramaphosa to enact strict measures to limit movement and gatherings.

The country’s Health Ministry on Friday revised the number of coronavirus-related deaths from two to one, saying one of the deaths could not be attributed to the virus.

In a speech earlier this week that was widely lauded for its clarity and conviction, Ramaphosa announced the impending lockdown, during which people will be allowed to leave home only to buy food, seek care, collect welfare grants or take walks by themselves. Running, dog-walking and even the purchase of cigarettes and alcohol have been banned.

On Thursday, Ramaphosa addressed the nation again, this time wearing army fatigues, a symbolic gesture never made before by the former business executive. Army and police personnel were deployed across the country to enforce the lockdown, but he urged them to be a “force of kindness” in a country that is still recovering from the trauma of decades of military-enforced apartheid that ended in 1994.

Their mission is the “most important in the history of our country,” he said. “Our people are terrified right now, and we should not do anything to make their situation worse.”

South Africa is one of the world’s most unequal countries. Gleaming, glassy business districts and suburbs pocked with swimming pools contrast sharply with enormous, densely packed “townships” and hardscrabble rural areas where the majority of the population lives. Pictures circulating in local media show long lines at supermarkets in numerous townships.

Mismanagement has hobbled the country’s state-run water and electricity companies, leaving many residents worried they could be marooned at home without essential services during the lockdown. South Africa was already in a recession, suffering from chronic unemployment that affects about a third of the working population, as well as widespread underemployment in an economy that is at least 50 percent informal — or off the books.

“First, I am out of work, so no money,” said Hector Manyike, a taxi driver in Johannesburg, South Africa’s biggest city. “And then I stay at home ,and we don’t know what will happen in three weeks. The virus may go everywhere. People are scared. It is very, very, very difficult, my brother.”

The majority of South Africa’s cases are in its most-populated provinces, which include the major cities of Johannesburg, Pretoria, Durban and Cape Town.

South Africa’s lockdown is one of the strictest in the world and could presage similar measures in other African countries. Neighboring Botswana’s president told citizens there to prepare for such an announcement soon. Rwanda is already in lockdown; Uganda has banned public transport; Eritrea has closed most public institutions; Nigeria, Africa’s most populous country, has banned travel between states.

On Friday, Kenya was scheduled to begin an indefinite nighttime curfew, which has been criticized for potentially creating more situations in which crowds will form. Kinshasa, the capital of Congo and one of Africa’s largest cities, with at least 14 million people, will initiate a four-day-on, two-day-off lockdown cycle starting Saturday.

Two dozen African countries have fully closed their borders, and 10 more have closed their airports to international traffic.