The office of Jacob Zuma said the president had visited the 94-year-old anti-apartheid leader yesterday evening and was informed by the medical team that his condition had become critical in the past 24 hours.
Mr Zuma said the doctors were “doing everything possible to get his condition to improve”.
Mr Mandela, who became South Africa’s first black president after the end of apartheid, was taken to hospital on June 8 for what the government said was a recurring lung infection.
Mr Zuma also met Graca Machel, Mr Mandela’s wife, at the hospital and discussed the former leader’s condition, according to the statement.
Mr Zuma appealed to South Africans and the rest of the world to pray for Mr Mandela, his family and the medical team attending to him.
Mr Mandela was jailed for 27 years under white racist rule and was released in 1990. He then played a leading role in steering the divided country from the apartheid era to democracy, becoming president in all-race elections in 1994.