JOHANNESBURG (AP) - Nelson Mandela was a master of forgiveness.
South Africa's first black president spent nearly a third of his life as a prisoner of apartheid, yet he sought to win over its defeated guardians in a relatively peaceful transition of power that inspired the world.
As head of state, the former boxer, lawyer and inmate lunched with the prosecutor who argued successfully for his incarceration. He sang the apartheid-era Afrikaans anthem at his inauguration and traveled hundreds of miles to have tea with the widow of the prime minister in power at the time he was sent to prison.
It was this generosity of spirit that made Mandela, who died Thursday at the age of 95, a global symbol of sacrifice and reconciliation in a world often jarred by conflict and division.
Mandela's stature as a fighter against apartheid - the system of white racist rule he called evil - and a seeker of peace with his enemies was on a par with that of other men he admired: American civil rights activist Martin Luther King Jr. and Indian independence leader Mohandas K. Gandhi, both of whom were assassinated while actively engaged in their callings.
Mandela's death deprived the world of one of one of the great figures of modern history and set the stage for days of mourning and reflection about a colossus of the 20th century who projected astonishing grace, resolve and good humor.
Dressed in black, South African President Jacob Zuma made the announcement on television. He said Mandela died "peacefully," surrounded by family, at around 8:50 p.m.
"We've lost our greatest son. Our nation has lost its greatest son. Our people have lost a father," Zuma said. "Although we knew that this day would come, nothing can diminish our sense of a profound and enduring loss."
At times, Mandela embraced his iconic status, appearing before a rapturous crowd in London's Wembley Stadium soon after his 1990 release from prison. Sometimes, he sought to downplay it, uneasy about the perils of being put on a pedestal. In an unpublished manuscript, written while in prison, Mandela acknowledged that leaders of the anti-apartheid movement dominated the spotlight but said they were "only part of the story," and every activist was "like a brick which makes up our organization."
He pondered the cost to his family of his dedication to the fight against the racist system of government that jailed him for 27 years and refused him permission to attend the funeral of his mother and of a son who was killed in a car crash. In court, he described himself as "the loneliest man" during his mid-1990s divorce from Winnie Mandela. As president, he could not forge lasting solutions to poverty, unemployment and other social ills that still plague today's South Africa, which has struggled to live up to its rosy depiction as the "Rainbow Nation."
He secured near-mythical status in his country and beyond. Last year, the South African central bank released new bank notes showing his face, a robust, smiling image of a man who was meticulous about his appearance and routinely exercised while in prison. South Africa erected statues of him and named buildings and other places after him. He shared the 1993 Nobel Peace Prize with F.W. de Klerk, the country's last white president. He was the subject of books, films and songs and a magnet for celebrities.
In 2010, Mandela waved to the crowd at the Soccer City stadium at the closing ceremony of the World Cup, whose staging in South Africa allowed the country, and the continent, to shine internationally. It was the last public appearance for the former president and prisoner, who smiled broadly and was bundled up against the cold.
One of the most memorable of his gestures toward racial harmony was the day in 1995 when he strode onto the field before the Rugby World Cup final in Johannesburg, and then again after the game, when he congratulated the home team for its victory over a tough New Zealand team. Mandela was wearing South African colors and the overwhelmingly white crowd of 63,000 was on its feet, chanting "Nelson! Nelson! Nelson!"
It was typical of Mandela to march headlong into a bastion of white Afrikanerdom - in this case the temple of South African rugby - and make its followers feel they belonged in the new South Africa.
The moment was portrayed in "Invictus," Clint Eastwood's movie telling the story of South Africa's transformation through the prism of sport.
It was a moment half a century in the making. In the 1950s, Mandela sought universal rights through peaceful means but was sentenced to life imprisonment in 1964 for leading a campaign of sabotage against the government. The speech he gave during that trial outlined his vision and resolve.
"During my lifetime I have dedicated myself to this struggle of the African people," Mandela said. "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."
He was confined to the harsh Robben Island prison near Cape Town for most of his time behind bars, then moved to jails on the mainland. 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 movement, and in the final stages of his confinement, he negotiated secretly with the apartheid leaders who recognized change was inevitable.
Thousands died, or were tortured or imprisoned in the decades-long struggle against apartheid, which deprived the black majority of the vote, the right to choose where to live and travel, and other basic freedoms.
So when inmate No. 46664 went free after 27 years, walking hand-in-hand with his then wife, Winnie, out of a prison on the South African mainland, people worldwide rejoiced. Mandela raised his right fist in triumph, and in his autobiography, "Long Walk to Freedom," he would write: "As I finally walked through those gates ... I felt - even at the age of seventy-one - that my life was beginning anew."
Mandela's release, rivaled the fall of the Berlin Wall just a few months earlier as a symbol of humanity's yearning for freedom, and his graying hair, raspy voice and colorful shirts made him a globally known figure.
Life, however, imposed new challenges on Mandela.
South Africa's white rulers had portrayed him as the spearhead of a communist revolution and insisted that black majority rule would usher in bloody chaos. Thousands died in factional fighting in the run-up to democratic elections in 1994, and Mandela accused the government of collusion in the bloodshed. But voting day, when long lines of voters waited patiently to cast ballots, passed peacefully, as did Mandela's inauguration as president
"Never, never and never again shall it be that this beautiful land will again experience the oppression of one by another and suffer the indignity of being the skunk of the world," the new president said. "Let freedom reign. The sun shall never set on so glorious a human achievement! God bless Africa! Thank you."
Mandela also stood hand on heart, saluted by white generals as he sang along to two anthems, now one: the apartheid-era Afrikaans "Die Stem," ("The Voice") and the African "Nkosi Sikelel' iAfrika" ("Lord Bless Africa").
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. However, corruption scandals and other missteps under the ruling African National Congress, the liberation group once led by Mandela, have undercut some of the early promise.
Zuma periodically observes that the South African white minority is far wealthier than the black majority, an imbalance that he regards as a vestige of the apartheid system that bestowed most economic benefits on whites.
When Mandela came to power, black South Africans anticipated quick fixes after being denied proper housing, schools and health care under apartheid. The new government, however, embraced free-market policies to keep white-dominated big business on its side and attract foreign investment. The policy averted the kind of economic deterioration that occurred in Zimbabwe after independence; South Africa, though, has one of the world's biggest gaps between rich and poor.
Nelson Rolihlahla Mandela was born on July 18, 1918, the son of a tribal chief in Transkei, a Xhosa homeland that later became one of the "Bantustans" set up as independent republics by the apartheid regime to cement the separation of whites and blacks.
Mandela's royal upbringing gave him a regal 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.
He moved to Johannesburg and worked as a policeman at a gold mine, boxed as an amateur heavyweight and studied law.
His first wife, nurse Evelyn Mase, bore him four children. A daughter died in infancy, a son was killed in a car crash in 1970 and another son died of AIDS in 2005. The couple divorced in 1957 and Evelyn died in 2004.
Mandela began his rise through the anti-apartheid movement in 1944, when he helped form the ANC Youth League.
He organized a campaign in 1952 to encourage defiance of laws that segregated schools, marriage, housing and job opportunities. The government retaliated by barring him from attending gatherings and leaving Johannesburg, the first of many "banning" orders he was to endure.
After a two-day nationwide strike was crushed by police, he and a small group of ANC colleagues decided on military action and Mandela pushed to form the movement's guerrilla wing, Umkhonto we Sizwe, or Spear of the Nation.
He was arrested in 1962 and sentenced to five years' hard labor for leaving the country illegally and inciting blacks to strike.
A year later, police uncovered the ANC's underground headquarters on a farm near Johannesburg and seized documents outlining plans for a guerrilla campaign. At a time when African colonies were one by one becoming independent states, Mandela and seven co-defendants were sentenced to life in prison.
The ANC's armed wing was later involved in a series of high-profile bombings that killed civilians, and many in the white minority viewed the imprisoned Mandela as a terrorist. The apartheid government, meanwhile, was denounced globally for its campaign of beatings, assassinations and other violent attacks on opponents.
Even in numbing confinement, Mandela sought to flourish.
"Incidentally, you may find that the cell is an ideal place to learn to know yourself, to search realistically and regularly the process of your own mind and feelings," he wrote in 1975 to Winnie Mandela, a prominent activist in her own right who was in a separate jail at that time.
Mandela turned down conditional offers of freedom during his decades in prison. In 1989, P.W. Botha, South Africa's hard-line president, was replaced by de Klerk, who recognized apartheid's end was near. Mandela continued, even in his last weeks in prison, to advocate nationalizing banks, mines and monopoly industries - a stance that frightened the white business community.
But talks were already underway, with Mandela being spirited out of prison to meet white government leaders. After his release, he took charge of the ANC, and was elected president in a landslide in South Africa's first all-race election.
Perceived successes during Mandela's tenure include the introduction of a constitution with robust protections for individual rights, and the Truth and Reconciliation Commission, which he established with fellow Nobel laureate Archbishop Desmond Tutu. It allowed human rights offenders of all races to admit their crimes publicly in return for lenient treatment. Though not regarded as wholly successful, it proved to be a kind of national therapy that would become a model for other countries emerging from prolonged strife.
Despite his saintly image, Mandela was sometimes a harsh critic. When black journalists mildly criticized his government, he painted them as stooges of the whites who owned the media. Some whites with complaints were dismissed as pining for their old privileges.
In the buildup to the Iraq War, Mandela harshly rebuked President George W. Bush. "Why is the United States behaving so arrogantly?" he asked in a speech. "All that (Bush) wants is Iraqi oil." He suggested Bush and then British Prime Minister Tony Blair were racists, and claimed America, "which has committed unspeakable atrocities in the world," had no moral standing.
Until Bush repealed the order in 2008, Mandela could not visit the U.S. without the secretary of state certifying that he was not a terrorist.
To critics of his closeness to Fidel Castro and Moammar Gadhafi despite human rights violations in the countries they ruled, Mandela explained that he wouldn't forsake supporters of the anti-apartheid struggle.
To the disappointment of many South Africans, he increasingly left the governing to Deputy President Thabo Mbeki, who won the next presidential election and took over when Mandela's term ended in 1999.
"I must step down while there are one or two people who admire me," Mandela joked at the time. When he retired, he said he was going to stand on a street with a sign that said: "Unemployed, no job. New wife and large family to support."
His marriage to Winnie Mandela had fallen apart after his release and he married Graca Machel, the widowed former first lady of neighboring Mozambique.
With apartheid vanquished, Mandela turned to peacemaking efforts in other parts of Africa and the world and eventually to fighting AIDS, publicly acknowledging that his own son, Makgatho, had died of the disease.
Mandela's final years were marked by frequent hospitalizations as he struggled with respiratory problems that had bothered him since he contracted tuberculosis in prison.
He stayed in his rural home in Qunu in Eastern Cape province, where Hillary Clinton, then U.S. secretary of state, visited him in 2012, but then moved full-time to his home in Johannesburg so he could be close to medical care in Pretoria, the capital.
His three surviving children are daughter Makaziwe by his first marriage, and daughters Zindzi and Zenani by his second.