(CNN) -- Nelson Mandela, the revered statesman who emerged from prison after 27 years to lead South Africa out of decades of apartheid, has died, South African President Jacob Zuma announced late Thursday.
Mandela was 95.
"He is now resting. He is now at peace," Zuma said. "Our nation has lost its greatest son. Our people have lost a father."
"What made Nelson Mandela great was precisely what made him human," the president said in his late-night address. "We saw in him what we seek in ourselves."
Mandela will have a state funeral. Zuma ordered all flags in the nation to be flown at half-staff from Friday through that funeral.
Mandela, a former president, battled health issues in recent months, including a recurring lung infection that led to numerous hospitalizations.
With advancing age and bouts of illness, Mandela retreated to a quiet life at his boyhood home in the nation's Eastern Cape Province, where he said he was most at peace. He was later moved to his home in the Johannesburg suburb of Houghton, where he died.