THE WHITE, RACIST government of South Africa held Nelson Mandela in prison for 27 years. He broke rocks into gravel and slaved in a lime quarry, where the glare from the lime damaged his eyesight.

Early on, he was held in a damp cell measuring 8 feet by 7 feet, with a straw mat to sleep on. He contracted tuberculosis.

Yet Mandela emerged from these horrors to become president of South Africa after the dreaded apartheid racial-separation system was lifted, shook hands with the president of the country that had jailed him, traveled widely, met numerous world figures and received many honors, including the Nobel Peace Prize and Philadelphia's Liberty Medal.

Although he survived terrible prison conditions with amazing physical and spiritual strength, Mandela finally yielded to the infirmities of old age and the damaged lungs from his long imprisonment.

He died yesterday at home in Johannesburg at age 95, as millions of South Africans and people all over the world prayed for him.

In Philadelphia, Mayor Nutter ordered city flags to be flown at half-staff today.

A spokesman for Jacob Zuma, the South African president, said soon after he was hospitalized June 8: "We all want Nelson Mandela to live forever, but we have to accept that he is human and adjust our expectations accordingly."

He was receiving treatment of a recurring lung infection but seemed to rally. His grandson, Mandla Mandela, said June 15 that "he's getting better," after visiting him in Pretoria. "He was looking very good."

Just the other day, Zuma said, using Mandela's clan name: "The doctors are doing everything possible to get his condition to improve and are ensuring that Madiba is well-looked after and is comfortable."

Mandela's remarkable life story thrilled and inspired people, especially those living in countries ridden with violence and poverty.

That this man could not only survive the ordeals he suffered at the hands of the apartheid government, but also emerge to shake the hand of F.W. de Klerk, the man who led the state that imprisoned him, and be elected president of South Africa in 1994 awed people around the world.

He was inaugurated May 10, 1994, in Pretoria, an event televised to a billion viewers globally.

Mandela was 72 when he was released from prison in February 1990. Despite his ordeal, he remained robust and engaging and traveled the world, meeting President George H.W. Bush and addressing both houses of Congress. He dropped in on French President Francois Mitterrand, Pope John Paul II and Cuban President Fidel Castro, a special hero of his, among other world leaders.

He traveled as far as Australia and Japan.

De Klerk and Mandela shook hands at the World Economic Forum in 1992. The following year, they visited the U.S. independently, meeting with President Bill Clinton. They jointly received the Liberty Medal in Philadelphia in 1993, and the Nobel Peace Prize in Norway the same year.

Imprisoned

Mandela and several followers were tried in 1963 and 1964 on charges of sabotage and conspiring to overthrow the South African government by force. The prosecution wanted the death penalty, but the judge sentenced the men to life in prison on June 12, 1964.

The trial gained international attention, with calls for leniency from the United Nations and the World Peace Council. Nightly vigils for Mandela were held in St. Paul's Cathedral in London.

The appeals went unheeded.

Mandela spent the next 18 years in the prison on Robben Island, where prisoners were subjected to hard labor.

Despite the harsh conditions, the prisoners of Robben Island conducted educational and political discussions, and Mandela eventually was allowed to receive visitors. They included his mother, in 1968, shortly before she died. His firstborn son, Thembi, died in a car accident shortly after. Mandela was not permitted to attend either funeral.

Oddly, Mandela kind of liked Robben Island. When he was transferred to another prison, he said he missed the scenery.

When Mandela celebrated his 60th birthday in 1978, international interest in his case was renewed. He was awarded an honorary doctorate in Lesotho as well as the Jawaharlal Nehru Award for International Understanding in India in 1979, and Freedom of the City of Glasgow, Scotland, in 1981.

In April 1982, he and his followers were moved to Pollsmoor Prison in Tokai, Cape Town. During his imprisonment, Mandela continued to study for a law degree.

Over the years, the South African government, under increasing international pressure to release Mandela and end apartheid, offered him his freedom and the legalization of the long-outlawed African National Congress in return for his denouncing violence and ending his demand for a majority government. He refused.

Meanwhile, violence raged in the country, as the ANC attacked government installations and the military fought back with increasing brutality.

Mandela was stricken with tuberculosis, and in December 1988 he was moved to Victor Verster Prison, near Paarl. There he lived in relative comfort, and was allowed many visitors, including de Klerk, then-South African president, who agreed to legalize the ANC and release all political prisoners.

Released

Mandela left Victor Verster on Feb. 11, 1990, holding the hand of his wife, Winnie. The event was broadcast live across the world.

He launched his tour of the world, meeting public figures and always promoting the cause of multiracial elections and an end to apartheid.

After more violence in his country, including attacks between the ANC and the Inkatha Freedom Party in KwaZulu-Natal, in which thousands died, leaders were urged to try the negotiation approach, which eventually led to the agreement to hold multiracial elections.

Although all was not peace and quiet in the country, as factions continued to battle for supremacy, the elections were held in April 1994 and the ANC took 62 percent of the national vote, enabling Mandela to become president.

He established a new constitution and formed a Truth and Reconciliation Commission to investigate human-rights abuses. He introduced policies to encourage land reform, combat poverty and expand health-care services.

He refused to run for a second term and was succeeded by his deputy, Thabo Mbeki. He spent his retirement years focusing on charitable work combating poverty and HIV/AIDS through his Nelson Mandela Foundation.

Not all was love and devotion in Mandela's life. He was accused of fostering violence (he pleaded guilty to sabotage at his trial) and of communist leanings, although he was never a member of the party.

The late Margaret Thatcher, British prime minister, called him a communist terrorist and supported the suppression of the ANC, although she later urged his release from prison.

Among Mandela's many other honors were the U.S. Presidential Medal of Freedom and the Soviet Order of Lenin.

Father was a chief

Mandela was a member of the Xhosa clan, born July 18, 1918, in the village of Mvezo in Umtata, a part of South Africa's Cape Province. His father, Gadla Henry Mphakanyiswa, was a chief in the Thembu royal family that ruled the Transkei region. Gadla had four wives. Mandela's mother, Nosekeni Fanny, was Gadla's third wife.

Mandela was given the forename Rolihlahla, a Xhosa term meaning "troublemaker." He later was known by his clan name, Madiba. He tended herds as a cattle boy. He was baptized a Methodist.

Mandela attended the University of Fort Hare and the University of the Witwatersrand, where he studied law. He lived in Johannesburg in a house that is now a museum.

After the right-wing National Party came to power in 1948, it began the apartheid policy of racial separation to keep the majority black population under control.

Mandela became a member of the ANC to oppose apartheid policies. He was elected president of the Transvaal ANC branch and helped run the 1955 Congress of the People. He frequently was arrested, along with other opponents of the government.

Although initially opposed to violence, Mandela co-founded the militant Umkhonto we Sizwe (MK) in 1961 and participated in a bombing campaign against the government.

3 marriages

Mandela was married three times. He married his first wife, Evelyn Ntoko Mase, in 1944. They were divorced in 1958.

He married the controversial Winnie Madikizela in 1958. She was accused of involvement in human-rights abuses, including the 1988 kidnapping and murder of 14-year-old Stompie Moeketsi.

Her bodyguard testified that Winnie ordered the kidnapping of the boy and three other youths being cared for by a Methodist minister, believing that the minister was molesting the youngsters. Stompie later was found with his throat slashed.

Winnie was arrested and sentenced to six years, which was reduced to a fine on appeal. She later was involved in the murder of a doctor who had examined the boy before he was killed. The case ended when the defense contended that witnesses were intimidated.

She was suspected of corruption after being appointed deputy minister of arts, culture, science and technology in the first post-apartheid government. She was fired.

Nevertheless, Winnie remained popular in the anti-apartheid movement and served as president of the ANC Women's League, among other positions.

She and Mandela divorced in 1996. In 1998, he married his last wife, Graca Machel. Altogether, Mandela had six children, including Zenani Dlamini, his daughter with Winnie, who is the South African ambassador to Argentina.

She returned to South Africa to be with her father, as did his wife, a children's-rights advocate who called off a trip to London to return to his bedside.

- Daily News wire services contributed to this report