In a statement on South African TV, President Jacob Zuma said Mandela had "departed."
"Our nation has lost its greatest son," he said. Mandela passed away at 8:50 p.m. at his Johannesburg home.
"He is now resting," Zuma said. "He is now at peace."
Mandela will receive a full state funeral. Zuma said he had ordered flags to be flown at half mast.
An icon of peaceful resistance, Mandela spent 27 years in prison, and went on to become South Africa's first black president.
President Obama marked Mandela's passing with an emotional statement, "He achieved more than could be expected of any man."
"He no longer belongs to us," Obama said, "he belongs to the ages."
Obama called Mandela "a man who took history in his hands and bent the arc of the moral universe toward justice."
"We will not see the links of Nelson Mandela again. It falls to us to carry forward the example that he set."