Former South African president Nelson Mandela is suffering from a recurring lung infection and is responding to treatment, officials have said.
A statement from presidential spokesman Mac Maharaj said the 94-year-old is "receiving appropriate treatment and he is responding to the treatment".
Mandela was admitted to the 1 Military Hospital near Pretoria, on Saturday.
In January 2011, Mr Mandela was admitted to a Johannesburg hospital for what officials initially described as tests but what turned out to be an acute respiratory infection.
Mr Mandela is revered for being a leader of the struggle against racist white rule in South Africa and for preaching reconciliation once he emerged from prison in 1990 after 27 years behind bars. He served one five-year term as president before retiring from public life.
The announcement has ended speculation about what was ailing Mr Mandela. Government officials had repeatedly declined to say what caused the nation's military, which is responsible for his care, to have him admitted to hospital.
That caused growing concern in South Africa, a nation of 50 million people which largely reveres Mr Mandela for being the nation's first democratically elected president who sought to bring the country together after centuries of racial division.
The tests he underwent at the hospital detected the lung infection, said presidential spokesman Mac Maharaj in a statement. "Madiba is receiving appropriate treatment and he is responding to the treatment," Mr Maharaj said, referring to Mr Mandela by his clan name as many do in South Africa in a sign of affection.
In January 2011, Mr Mandela was admitted to a Johannesburg hospital for what officials initially described as tests but what turned out to be an acute respiratory infection. The chaos that followed his stay at that public hospital, with journalists and the curious surrounding it and entering wards, saw the South African military take charge of his care and the government control the information about his health.
In recent days, many in the press and public have complained about the lack of concrete details that the government has released about Mr Mandela's condition.