Nelson Mandela, who was discharged from a more than 80-day stay in hospital on Sunday, spent 27 years as a prisoner of apartheid before embarking on a "long walk to freedom", becoming South Africa's first black president and a Nobel peace laureate.
The frail 95-year-old remains one of the world's most beloved figures even if in recent years his public appearances have been few and far between.
The eyes of the world were on Mandela on February 11, 1990, when he emerged, unbowed, from nearly three decades behind bars for opposing the white-minority apartheid regime -- one of the most potent images of the time.
Four years later, the prisoner became president, setting South Africa on a course towards reconciliation by restoring dignity to the black majority and reassuring whites that they had nothing to fear from change.
"We enter into a covenant that we shall build a society in which all South Africans, both black and white, will be able to walk tall, without any fear in their hearts, assured of their inalienable right to human dignity -- a rainbow nation at peace with itself and the world," he declared when he took office in 1994.
The Nobel Institute honoured Mandela and outgoing white president Frederik de Klerk with its peace prize in 1993.
Anglican archbishop Desmond Tutu, who also won a Nobel peace prize, once explained it was the years spent in prison that turned Mandela into a healer.
"He came out a far greater person than the man who went in... a person who had compassion, a deep compassion even for his perpetrators. He had learned to understand the foibles and weaknesses of human beings and to be more generous in his judgment of others."
Mandela, affectionately known by his clan name "Madiba", has charmed audiences with his self-deprecatory wit and his humanity.
Perhaps two of his finest moments came when he had tea with the widow of apartheid architect Hendrik Verwoerd, and when he donned the Springboks rugby jersey to congratulate the mainly white team's victory in the 1995 Rugby World Cup.
Born in the village of Mvezo in one of South Africa's poorest regions, the Transkei, on July 18, 1918, Rolihlahla Dalibhunga Mandela was the great-grandson of a Tembu king.
He was given his English name "Nelson" by a teacher at his school.
An activist since his student days at Fort Hare University College in the southeast, Mandela opened the first black law firm in Johannesburg in 1952, along with fellow activist Oliver Tambo.
He became commander-in-chief of Umkhonto we Sizwe (Spear of the Nation), the armed underground wing of the African National Congress, in 1961 and the following year underwent military training in Algeria and Ethiopia.
Mandela was arrested and sentenced in 1964 to life in prison during the Rivonia trial where he delivered a speech that was to become the manifesto of the anti-apartheid movement.
"During my lifetime, I have dedicated myself to this struggle of the African people. I have fought against white domination and I have fought against black domination. I have cherished the ideal of a democratic and free society... It is an ideal for which I am prepared to die."
Mandela was imprisoned on Robben Island for 18 years before being transferred in 1982 to Pollsmoor prison in Cape Town and later to Victor Verster prison in nearby Paarl.
As international sanctions mounted against South Africa, hardline president P.W. Botha was replaced in 1989 by the more conciliatory De Klerk who a year later ordered the release of Mandela.
Four years later, Mandela once again embodied the hopes of his nation when he turned up at the polls in April 1994, casting his ballot for the first time in his life in the Kwazulu-Natal province where pre-election violence had killed hundreds.
Mandela served only one five-year term as president but after his retirement in 1999 he devoted his considerable energy -- despite increasing physical frailty -- to mediating conflicts, especially the war in Burundi.
In 1998, on his 80th birthday, Mandela, after having divorced Winnie Madikizela-Mandela, married Graca Machel, the widow of Mozambican president Samora Machel.
Having been deprived of seeing his own children grow up during his years in jail, Mandela has shown a commitment to improving the lives of youngsters, drumming up money from businesses to build schools in remote areas.
At age 83, he was diagnosed with prostate cancer and successfully underwent treatment.
In May 2004, Mandela announced that he would be scaling back his public schedule to enjoy "a much quieter life" with his family and friends.
He convened the press at his home eight months later to announce that his only surviving son had died of AIDS and to appeal for openness about the disease.
He has three daughters, Maki, Zindzi and Zenani.
In 2009, the United Nations declared his birthday Nelson Mandela International Day, the first such honour for an individual.
One of Mandela's most recent forays onto the world stage was to help bring the World Cup to South Africa in 2010, the first time the tournament was held in Africa. He delighted the crowds at the final with a surprise appearance on the back of a golf buggy.
After the World Cup, President Jacob Zuma said the surge of national pride around the tournament had brought the country close to realising Mandela's vision.
"We came very close if we did not fully achieve your dream, Tata (father), of one nation united in its diversity, celebrating its achievements and working together," he said.–AFP