One of Mandela's daughters said the 94-year-old is still opening his eyes and reacting to the touch of his family even though his situation is precarious.
The news of his health taking a positive turn came amid a growing sense in South Africa that Mandela was approaching the end of his life. Well-wishers have delivered flowers and messages of support to the Pretoria hospital where he is being treated, and prayer sessions were held around the country on Thursday.
President Jacob Zuma's office released a statement saying he received the encouraging update from Mandela's medical team. Zuma had canceled an international trip on Thursday, instead visiting Mandela for the second time in two days.
Mandela, who was imprisoned for 27 years during white racist rule and became president in all-race elections in 1994, was taken to a hospital on June 8 for what the government said was a recurring lung infection.
The former president's condition is acknowledged to be grave. According to a few television networks that quote anonymous sources, he is said to be on life support systems. Presidential spokesman Mac Maharaj has declined to confirm or deny those reports.
President Barack Obama, who is visiting Africa, said in Senegal on Thursday that his thoughts and prayers are with South Africans and with the Mandela family. He said he was inspired, as a law school student in the early 1990s, to see Mandela step forward after decades of imprisonment to help deliver democracy in a spirit of reconciliation with his former captors.
"It gave me a sense of what is possible in the world when righteous people, when people of good will, work together on behalf of a larger cause," said Mr. Obama, who described Mandela as a personal hero. "And if and when he passes from this place, one thing I think we'll all know is that his legacy is one that will linger on throughout the ages."
The Associated Press contributed to this report.