Mandela, 94, has become increasingly frail in recent years and has been hospitalized several times in recent months, including earlier this month when he underwent what authorities said was a scheduled medical test. The Nobel laureate is a revered figure in South Africa, which has honored his legacy of reconciliation by naming buildings and other places after him and printing his image on national banknotes.
"I'm so sorry. I'm sad," said Obed Mokwana, a Johannesburg resident. "I just try to pray all the time. He must come very strong again."
The Nobel laureate was admitted to a hospital just before midnight Wednesday "due to the recurrence of his lung infection," the office of President Jacob Zuma said in a statement.
Mandela contracted tuberculosis during his 27-year imprisonment for fighting white racist rule in South Africa. He has repeatedly had lung problems.
"Doctors are attending to him, ensuring that he has the best possible expert medical treatment and comfort," the statement from the presidency said. It appealed "for understanding and privacy in order to allow space to the doctors to do their work."
Presidential spokesman Mac Maharaj, referring to Mandela by his clan name "Madiba," said the trip to a hospital in the South African capital of Pretoria was not for previously scheduled treatment.
"No, this wasn't scheduled, as you will appreciate the doctors do work with a great sense of caution when they are treating Madiba and take into account his age," he said. "And so when they found that this lung infection had reoccurred they decided to have him immediately hospitalized so that he can receive the best treatment."
In December, Mandela spent three weeks in a hospital in Pretoria, where he was treated for a lung infection and had a procedure to remove gallstones.
Maharaj acknowledged there was cause for worry, but said the medical specialists treating Mandela were very competent.
"With Madiba and a person of his age there always has to be concern and therefore the doctors, I think we need to appreciate, will prefer to work on the side of caution rather than taking any risks," he said from the coastal city of Durban.
He said there had been a global outpouring of messages expressing concern for Mandela's health.
Zuma wished Mandela a speedy recovery.
"We appeal to the people of South Africa and the world to pray for our beloved Madiba and his family and to keep them in their thoughts. We have full confidence in the medical team and know that they will do everything possible to ensure recovery," the presidential statement quoted Zuma as saying.
Mandela spent a night in a hospital and was released on March 10 following a medical test. At that time, spokesman Maharaj said Mandela was "well."
In February 2012, Mandela spent a night in a hospital for minor diagnostic surgery to determine the cause of an abdominal complaint. In January 2011, he was admitted to a Johannesburg hospital for what officials initially described as tests but what turned out to be an acute respiratory infection. He was discharged days later.
He also had surgery for an enlarged prostate gland in 1985.
Under South Africa's white-minority apartheid regime, Mandela served 27 years in prison, where he contracted tuberculosis, before being released in 1990. He later became the nation's first democratically elected president in 1994 under the banner of the African National Congress, helping to negotiate a relatively peaceful end to apartheid despite fears of much greater bloodshed. He served one five-year term as president before retiring.
Perceived successes during Mandela's tenure include the introduction of a constitution with robust protections for individual rights and the Truth and Reconciliation Commission, a panel that heard testimony about apartheid-era violations of human rights as a kind of national therapy session. South Africa still struggles with crime, economic inequality and other social ills.
Mandela last made a public appearance on a major stage when South Africa hosted the 2010 World Cup soccer tournament.
He had spent more time in the rural village of Qunu in Eastern Cape province, where he grew up. He was visited there in August by Hillary Clinton, who was U.S. secretary of state at the time.
Doctors said in December that he should remain at his home in the Johannesburg neighborhood of Houghton for the time being to be close to medical facilities that can provide the care he needs.
APTN Senior Producer Ed Brown contributed to this report from Durban, South Africa.