Former South African President and anti-apartheid revolutionary hero Nelson Mandela has died at his Johannesburg home. He was 95.
He had returned home on September 1 in a critical condition after being in a Pretoria hospital for almost three months - the fourth time he had been admitted to hospital since December. He had battled a series of lung infections and respiratory illnesses in the past few years.
Mandela, who spent 27 years in prison after being found guilty of sabotage and conspiracy to overthrow his country's government before being released in 1990, became South Africa's first democratically elected president, holding office from 1994 to 1999.
One of the world's most famous people, he has long been a figurehead for racial unification, following his efforts to heal his own country after centuries of division.
News of his death has prompted an outpouring of grief from all corners of the world.
New Zealand Prime Minister John Key expressed his sorrow.
"Nelson Mandela was an inspirational leader, and a remarkable man," Key said.
"On behalf of the New Zealand people and the Government, I would like to express my sincere condolences to both his family and all South Africans.
"For years he symbolised South Africa's hope for a future free from apartheid."
Mandela had a history of lung problems, after falling ill with tuberculosis in 1988 toward the tail-end of his prison term before his release and subsequent presidency.
While doctors said at the time the disease caused no permanent damage to his lungs, medical experts say tuberculosis can cause problems years later for those infected.
The Nobel laureate had an acute respiratory infection in January 2011.
Following the chaos that surrounded his stay at a public hospital then, the South African military took charge of his care and the government took over control of the information about his health. It released little, mostly saying early in his last hospital stay that he was in a "serious but stable condition'', but in late June it said he was "critical but stable''. In July the government denied that he was in a vegetative after a lawyer for some of his family told a court his life support system should be shut off.
AN EVERLASTING LEGACY:
Mandela was one of the most revered leaders of the 20th century and his legacy will forever be the abolition of apartheid in South Africa.
The man endearingly known throughout South Africa as Madiba - his Xhosa clan name, which literally translates to grandfather - cemented his place in history when he became the first democratically elected president - black or white.
As a founder of Umkhonto we Sizwe (Spear of the Nation), which was the armed wing of the African National Congress (ANC), Mandela was a militant anti-apartheid activist from a young age.
He was sentenced to life in prison after being charged and convicted of sabotage in 1962.
Left to the mercy of the prison guards in a white supremacist South Africa, his release 27 years later in 1990 set in motion the cogs of an anti-apartheid movement that had the backing of much of the world.
His release was all the more astonishing for a total lack of animosity toward his captors. In a speech on the day of his release, Mandela quoted his own words, which he spoke at his trial in 1962:
"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."
Four years later apartheid in South Africa had ended and in 1995 Mandela became the first elected president - ending the irony behind the name the Republic of South Africa.
His presidency was spent building what his inaugural address called a "rainbow nation at peace with itself and the world".
As the ANC party under Mandela began to dismantle the racial divide, his attention turned to the issue of HIV/AIDS, which according to the World Health Organisation, affects about 6.5 million people in South Africa.
But the crusade was more personal for Mandela, who lost his eldest son in 2005 to the disease at the age of 54.
After his departure from politics, Mandela also sought to step away from the public eye with appearances in recent years becoming fewer and farther between.
His last public appearance was in 2010 when South Africa hosted the FIFA World Cup.