"Only free men can negotiate," he said. "Your freedom and mine cannot be separated."
In 1988, Mandela turned 70 and, a month later, contracted tuberculosis. His illness was successfully treated, but government officials worried they were being held hostage by Mandela's imprisonment. Releasing him could spark a revolution, but his death in prison might do the same.
The government launched an elaborate plan to demythologize Mandela and "release him in steps," as one official put it at the time. That year, he was transferred from his prison in suburban Cape Town to a nearby prison farm, where he lived in a three-bedroom house.
Mandela met secretly at the prison, and even in the presidential mansion, with Botha and government ministers to draw up a framework for discussions between the government and the ANC. Botha suffered a stroke in 1989 and De Klerk took over soon after, freeing seven of the longest-serving political prisoners. Four months later, in February 1990, De Klerk lifted the ban on the ANC and other black political groups and freed Mandela.
The first years after Mandela's release were rocky. About 10,000 people were killed from 1990 through '93, many of them in violence between competing black political forces, notably the ANC and the Inkatha Freedom Party.
Mandela suspected that much of the internecine bloodshed was fomented by white extremists, some operating from inside the government. Infuriated by the government's reluctance to investigate the killings, Mandela walked out of peace talks in 1992. He returned to the negotiating table several months later.
In April 1994, South Africa staged its first democratic elections and the ANC swept to power in the new multiracial Parliament, which elected Mandela the nation's first black president. He was 75 years old.
As president, Mandela brought together right-wing whites and militant blacks under his banner of nonracial democracy. He won broad support for an ambitious program of reconstruction and development. Unemployment, crime and racial conflict persisted, but the president's popularity helped keep the country together.
Toll on personal life
Mandela's personal life, though, had begun to fall apart after his release from prison. His commitment to a unified South Africa put him at odds with Madikizela-Mandela, the second wife who had stood beside him throughout his incarceration but became increasingly radicalized. They separated in 1992 after she was convicted of orchestrating the kidnapping and assault of several township youths, one of whom was killed, by her bodyguard retinue.
Then, as president, Mandela forced his estranged wife's resignation as deputy minister of arts, culture, science and technology after she was embroiled in a series of shady business deals and other scandals. He finally sued for divorce, but she refused to settle out of court.
In March 1996, the president took the stand in a packed Johannesburg courtroom to publicly accuse her of adultery with an ANC aide. Speaking stiffly, Mandela said that after his release from prison, his wife had never entered their bedroom while he was awake.
"I was the loneliest man during the period I stayed with her," he said. The judge granted the divorce and longtime friends, such as Archbishop Desmond Tutu, lamented the demise of the relationship.
"We wanted them to have a kind of fairy-tale ending," Tutu said.
Two years later, on his 80th birthday, Mandela married Graca Machel, the former first lady of Mozambique whose husband had died in a plane crash.
"I don't regret the … setbacks I've had because, late in my life, I am blooming like a flower because of the love and support she has given me," Mandela said of Machel. "She has changed my life."
An absent father and husband most of his life, Mandela had as many as four grandchildren living with him during his final years as president. Besides Machel, he is survived by a daughter, Maki, from his first marriage; two daughters from his marriage to Madikizela-Mandela, Zindzi and Zenani; and numerous grandchildren and great-grandchildren.
Nelson Mandela was born July 18, 1918, in Mvezo, a hamlet in South Africa's Transkei region, now the Eastern Cape. His father, Gadla Henry Mphakanyiswa, a nobleman and chief in the small Thembu tribe, named him Rolihlahla.
"I do not believe that names are destiny or that my father somehow divined my future," Mandela wrote in his 1994 autobiography, "Long Walk to Freedom," "but in later years, friends and relatives would ascribe to my birth name the many storms I have both caused and weathered."