"During my lifetime I have dedicated myself to the 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 in which all persons live together in harmony and with equal opportunities. It is an ideal which I hope to live for and to achieve. But, if needs be, it is an ideal for which I am prepared to die.
These words, spoken at Nelson Mandela's 1964 trial on charges of treason, sealed his reputation as a tireless warrior for justice.
Incarcerated by his country's government for 27 years, he was one of the most inspirational and best-loved leaders of the 20th century.
After almost 50 years spent fighting apartheid, he became South Africa's first democratically elected president at the age of 71, four years after emerging from prison.
Born Rolihlahla Mandela – 'Nelson' came later, added by a primary school teacher – in South Africa on July 18, 1918, he was groomed for the role of privy councillor to the royal family of Thembuland in Cape Province after his father's death.
Following a boarding school education, he enrolled at Fort Hare University where he joined student protests against white minority rule.
While training as a lawyer he entered politics in earnest, joining the African National Congress in 1942. Ten years later, along with Oliver Tambo, he founded the first black legal firm.
During the Fifties he married second wife Winnie Madikizela, who took an active role in the campaign to free him.
His ' resistance to apartheid led to him becoming targeted for harassment by the government. When the country was convulsed by the 1960 Sharpeville Massacre in which the police opened fire on peaceful protestors, killing 56 people the authorities came down hard on all opposition.
The ANC was declared illegal and he went underground to lead the newly outlawed organisation. To evade the security officials the freedom fighter disguised himself sometimes as a labourer, at other times as a chauffeur earning the sobriquet of Black Pimpernel.
In 1961, concerned that peaceful methods didn't seem to be bringing about a change in the apartheid system, the ANC founded the armed movement Umkhonto we Sizwe. A campaign of sabotage against government and economic installations was then launched under his leadership.
Over the next two years several ANC leaders were arrested and he was accused of sabotage and conspiracy to overthrow the government. In 1964 he was given a life sentence.
Despite being incarcerated in the maximum security prison of Robben Island, seven kilometres off the coast of Capetown, he had no intention of giving up the fight, however.
Along with other inmates he instigated a remarkable education system in which prisoners gave each other classes in history, economics, politics or philosophy. During nearly three decades the world's most high profile political prisoner never compromised his principles, rejecting all offers of freedom and sentence reduction.
Change for South Africa had to come eventually and when it did, the imprisoned ANC leader played a major role in events. He'd been involved in secret talks with government ministers since 1986 and these came to fruition on February 2, 1990, when FW de Klerk, then president of South Africa, lifted the ban on the ANC, and with the leader's's sentence.
When, nine days later, the hero was released, the world celebrated. In 1993 he and President de Klerk were awarded the Nobel Peace prize "for laying the foundations for a new democratic South Africa". And in May of the following year, the man who had walked to freedom just four years previously, became the country's first democratically elected president.
The South African hero married three times. In 1957, after 13 years of marriage, he divorced his first wife Evelyn Ntoko, with whom he had three children.
The following year he married Winnie, a prominent ANC activist 16 years his junior. They had two daughters before separating in 1992 and divorcing four years later. A statement issued by the ANC announcing their separation bears testament to the warmth of his 's character.
"My love for her remains undiminished," it read. "I part from my wife with no recriminations. I embrace her with all the love and affection I have nursed for her inside and outside prison from the moment I first met her."
Two years after their divorce he married Graça Machel, the widow of Samora Machel, a freedom fighter from Mozambique who, like Mandela, rose to become his country's president. They tied the knot in a simple ceremony on his 's 80th birthday, when she was 52.
In June 1999 the leader stepped down from the presidency and he and Graça set up home in his childhood hometown of Qunu. They continued to travel as guests of heads of state throughout the world.
The elder statesman, who told his story in moving and articulate terms in his best-selling 1994 autobiography, Long Walk To Freedom, was awarded over 50 honorary degrees and became a tireless worker for good causes. His own charity, the Nelson Mandela Children's Fund, is supported by people of all walks of life across the globe, including model Naomi Campbell.
In 2003 he launched an initiative to fight Aids in Africa under the label "46664", his prisoner number. Later he would reveal his second son, Makgatho, had died of the disease.
Unbelievably, the legendary statesman showed no sign of rancour or bitterness about the suffering he endured while fighting for his people.
"No one is born hating another person because of the colour of his skin, or his background, or his religion. People must learn to hate. And if they can learn to hate, they can be taught to love, for love comes more naturally to the human heart than its opposite," he said.
He passed away peacefully at the age of 95 on 5 December, 2013.