The violence along the way has been considerable; the victims and the orphans many. But the birth-pangs of the new nation, as inevitable as they have been atrocious, will fail to prevent posterity from marking down the South African revolution as one of the most remarkable achievements of the human spirit. The measure of the achievement is that things could have turned out so catastrophically different. You have only to glance at Rwanda, where 100,000 have been butchered in the last two weeks, to see that.
For four decades, indeed for the 300 years since the arrival of the white settler, South Africa was Rwanda waiting to happen. You could not keep three-quarters of the population of a country down by law just because of an accident of birth and hope their patience would not eventually snap. Logic and justice pointed towards the worst horror of all.
Nelson Mandela, sitting in prison, had other ideas. He wrote to the government early in 1989, a year before his release, and proposed a deal. Let's negotiate, he said. Let's find a way to accommodate black aspirations without stoking white fears. Let's pursue the liberation struggle by other means.
The first obstacle to overcome was the resistance of the ruling Afrikaner establishment. They ruled in favour because they knew change, sooner or later, had to come. Best to cut a deal before it was too late to salvage anything. The collapse of the Berlin Wall in 1989, and with it the inevitable implosion of the Communist element in Mr Mandela's ANC, provided the final shove. On 2 February 1990, the most critical date in South African history, President de Klerk took a deep breath and announced the unbanning of the ANC and the imminent release of Mr Mandela.
'Look]' said Thabo Mbeki, the ANC's director of international affairs, on his return home after 30 years in exile. 'We have no horns]' It took four years to persuade first the National Party government and the white population at large that Mr Mbeki was not hiding a big red fork behind his back.
Through constant exposure in the media Mr Mandela, more than any other ANC leader, has persuaded white people that they can live with him. An amazing editorial last Saturday in the Citizen, South Africa's most right-wing English-language daily, drew the following conclusion from Mr Mandela's live debate on Thursday night with Mr de Klerk: 'Nobody can doubt, from this performance, he is a man who can carry the mantle of state president with great humility and success.'
The ballast for the change was provided by the political guarantees the ANC was persuaded to provide after an excruciatingly long process of negotiation. The decisive moment came when the ANC, prodded by the township killings into the realisation that the alternative was endless violence, agreed to defer majority rule. The country's first democratic elections, it was agreed, would see in a coalition government of national unity that would rule for five years until 1999.
From that concession others flowed. Under the new order, government would be decentralised; public servants, including the police and army, would keep their jobs, salaries and pensions; the economy would continue to run along free-market principles; the farmers, often beneficiaries of forced removals, would keep their land.
The human contact of the negotiations, the bridging of the apartheid gap, subdued the old enmities, softened people by degrees, taught all sides a lesson politicians of all hues never knew in the past: that the best is often the enemy of the good.
The new flag was no one's first choice. It corresponded to no party's insignia. The design was the product, like everything else, of negotiated compromise.