South Africa will go into lockdown for three weeks from midnight on Thursday.
President Cyril Ramaphosa said on Monday night that the National Command Team on the coronavirus said this was a necessary step to contain the spread of global pandemic.
South Africans would have to "stay at home" until midnight on April 16.
Ramaphosa said essential services personnel would be the only ones exempted, including police, healthcare workers and those involved in the supply of goods, including food.
"We must do everything in our means to delay the spread of infection over a long period. It is essential that every person should adhere strictly to the regulations and measures we are announcing," said Ramaphosa.
"The next few days are crucial. Without decisive action the number of infected people will increase."
He was addressing the nation on government's interventions to prevent the spread of coronavirus of the country.
Earlier on Monday, health minister Dr Zweli Mkhize said that the number of confirmed Covid-19 cases had risen to 402.
This is a developing story.