At the same time, Mandela was himself uneasy with the idea of being an icon and he did not escape criticism as an individual and a politician, though much of it was muted by his status as a unassailable symbol of decency and principle. As president, he failed to craft a lasting formula for overcoming South Africa's biggest post-apartheid problems, including one of the world's widest gaps between rich and poor. In his writings, he pondered the heavy cost to his family of his decision to devote himself to the struggle against apartheid.
He had been convicted of treason and sentenced to life imprisonment in 1964 for leading a campaign of sabotage against the government, and sent to the notorious Robben Island prison. It was forbidden to quote him or publish his photo, yet he and other jailed members of his banned African National Congress were able to smuggle out messages of guidance to the anti-apartheid crusade.
As time passed -- the "long, lonely, wasted years," as he termed them -- international awareness of apartheid grew more acute. By the time Mandela turned 70 he was the world's most famous political prisoner. Such were his mental reserves, though, that he turned down conditional offers of freedom from his apartheid jailers and even found a way to benefit from confinement.
"People tend to measure themselves by external accomplishments, but jail allows a person to focus on internal ones; such as honesty, sincerity, simplicity, humility, generosity and an absence of variety," Mandela says in one of the many quotations displayed at the Apartheid Museum in Johannesburg. "You learn to look into yourself."
Thousands died, were tortured and were imprisoned in the decades-long struggle against apartheid, so that when Mandela emerged from prison in 1990, smiling and waving to the crowds, the image became an international icon of freedom to rival the fall of the Berlin Wall.
South Africa's white rulers had portrayed Mandela as the spearhead of a communist revolution and insisted that black majority rule would usher in the chaos and bloodshed that had beset many other African countries as they shook off colonial rule.
Yet since apartheid ended, South Africa has held four parliamentary elections and elected three presidents, always peacefully, setting an example on a continent where democracy is still new and fragile. Its democracy has flaws, and the African National Congress has struggled to deliver on promises. It is a front-runner ahead of 2014 elections, but corruption scandals and other missteps have undercut some of the promise of earlier years.
"We have confounded the prophets of doom and achieved a bloodless revolution. We have restored the dignity of every South African," Mandela said shortly before stepping down as president in 1999 at age 80.
Nelson Rolihlahla Mandela was born July 18, 1918, the son of a tribal chief in Transkei, one of the future "Bantustans," independent republics set up by the apartheid regime to cement the separation of whites and blacks.
Mandela's royal upbringing gave him a dignified bearing that became his hallmark. Many South Africans of all races would later call him by his clan name, Madiba, as a token of affection and respect.
Growing up at a time when virtually all of Africa was under European colonial rule, Mandela attended Methodist schools before being admitted to the black University of Fort Hare in 1938. He was expelled two years later for his role in a student strike.