JOHANNESBURG -- "Experience teaches us," Alexis de Tocqueville wrote, "that, generally speaking, the most perilous moment for a bad government is when it seeks to mend its ways."

So it is for South Africa, a country that has slipped its ideological moorings and the ironclad certainties of the apartheid system that ruled life here for 42 years and set off on a dangerous but exhilarating voyage of self-discovery.

When I left South Africa in July 1986 after three years as The Washington Post's correspondent, the country was in the grip of a state of emergency. It was a time of random violence and systematic cruelty. At least 10,000 people were locked up without charge or trial. Just before I left, a white policeman shot dead a 9-year-old black in the boy's backyard in Soweto, saying he had mistaken his victim for a stray dog.

I came back for the first time recently -- to a land in metamorphosis. The oppressive shell of the old remains, yet within its very body, a new South Africa is struggling to be born -- "trembling between the impossible and the inevitable," according to former exile Albie Sachs.

There is more violence and in some ways more despair than when I left. In the first 10 months of 1990, according to the South African Institute of Race Relations, 3,038 people died in civil unrest -- an average of 10 per day. That is more than were killed during all three years of the uprising I witnessed and more than have died in 21 years of strife in Northern Ireland.

Violent crime is up. It is fueled in part by a lost generation of black youths who abandoned their inferior schools and took to the streets seeking to overthrow white rule and who now face the yawning gap between their dreams of liberation and the reality of unemployment in a dead-end ghetto.

Poverty is at its highest level in decades. Operation Hunger, the non-profit, self-help organization, is feeding 1.4 million South Africans who cannot afford to feed themselves -- and reckons that by year's end the figure will rise to 2 million.

Paradoxically, there is also more hope. By his bold decisions to release Nelson Mandela, unban opposition groups and open negotiations, President Frederik W. de Klerk has lifted the lid on the national pressure cooker, revealing a rich, strange stew of anger, good will and expectations. This mixture could be seen in all its strangeness in the events of recent days: the meeting late last month between Mandela and Zulu Chief Mangosuthu Buthelezi, to attempt to end the bloody fighting among their followers, and de Klerk's extraordinary announcement of nine days ago to remove what he called the "cornerstones of apartheid" -- such as the racial classification laws.

"For many of our people this has been a difficult process," acknowledged de Klerk in a speech to parliament last June. "Many South Africans preferred the situation when unpleasant political realities could be swept under the carpet . . . . It has been a bewildering and sometimes frightening experience for many."

Everyone seems desperate for reassurance. Few whites have found it in Mandela, partly because many seem incapable of putting their faith in any black leader and partly because many were disappointed with his uncompromisingly tough address on the day he left prison. And while many blacks seem to like de Klerk, they do not trust a white government that has inflicted so much pain on them and they do not see the immediate improvements in their daily lives they had, perhaps naively, expected.

Joe Slovo, the long-exiled South African Communist Party leader who returned last April, says people confront him constantly on airplanes, at the corner grocery, even at traffic lights. Many have the same question: "What's going to happen?"

Some cannot stand the suspense. But others are thrilled at the possibilities. Mark Swilling, a political scientist whose Planact urban think tank provides expertise and advice to local black civic groups and trade unions, says even disappointments can fuel advances.

"This isn't Eastern Europe," said Swilling. "We have a very highly developed civil society and a rich diversity. Democracy has really taken hold at a grass-roots level. We are a renaissance society." When I left South Africa, de Klerk was a hard-line cabinet minister for education who spoke the convoluted language of apartheid and threatened to cut state subsidies to the country's liberal universities if they did not rein in radical students. Nelson Mandela was an apparition, demonized by a fearful government and deified by black township youth. To display his photo was a crime.

South Africa was trapped inside its own riddle. Pieter W. Botha, de Klerk's blustery, authoritarian predecessor, sought to mete out small doses of freedom without losing white control. When blacks rebelled against his program of limited reform, he cracked down hard. Some, who had been released from detention just three months earlier and had submitted affidavits charging they had been tortured by security police, found themselves facing those same keepers again.

Yet even then, South Africa was not a totalitarian state. Because it sought to preserve a small haven of democracy for whites within the vast prison of restrictions for blacks, freedom coexisted alongside repression. The government permitted a modicum of breathing room for those brave enough and agile enough to exploit it.

The South Africa I came back to a few weeks ago still struggles with this contradiction. Security police still work from the infamous John Vorster Square, the gray concrete-and-glass tower where a half-dozen black political prisoners died over the years in incredible circumstances (Solomon Modipane "slipped on a bar of soap," Matthews Mabelane "accidentally fell out a 10th story window," etc.). But just a few blocks away, Mandela, Oliver Tambo and a host of former exiles the police have been waiting to get their hands on for three decades work openly.

Researchers at the Human Rights Commission say that despite the thaw, more than 1,600 people were detained last year under the Internal Security Act and related laws and at least 200 remain locked up. A shadowy "Third Force" of police vigilante groups and death squads still operates in black townships, undermining not only efforts at black political unity but also de Klerk's strategy of reconciliation.

At times the government still seems opaque, its motives and its plans unfathomable. No one outside the inner circle, for example, is quite certain about how much control de Klerk wields over the massive state security apparatus he inherited from Botha.

Sometimes the Newspeak of the old South Africa bursts through. When police last month hauled off to jail 25 members of the Barolong clan for squatting illegally on land the government had taken from them 20 years earlier, the authorities, in Orwellian language, both confirmed and denied the evictions in the same press release. Deputy Minister for Law and Order Johan Scheepers said that police had merely "responded to a complaint by the owner" of the property.

In the new South Africa, gravity itself sometimes seems suspended. For four decades, the ruling National Party relentlessly consolidated power, set up a semi-socialist economic system to reward its Afrikaner supporters and undermined or eliminated independent institutions that sought to check its powers. Now that same party says it opposes big government, wants a bill of rights, a strong judiciary and separation of powers and preaches the gospel of free enterprise.

While former Soviet bloc countries run away from socialism and centralization, Mandela's African National Congress advocates a strong central authority. Meanwhile, Slovo's Communist Party, once reputedly one of the world's most disciplined and Stalinist, enlists a new generation of supporters around the idea of multi-party, democratic socialism.

Suddenly, after years of caution, restraint and secrecy, the fear is gone.

Three years ago, South African agents in Mozambique blew up Albie Sachs, the ANC's gentle, inquisitive legal expert. Although maimed, he survived, and now his once-banned writings are on display in virtually every bookstore here. Black majority rule may not be enshrined in the constitution, but it is reality on many streets. Central Johannesburg, where white police once ruled with pass laws and plastic whips, is now a black city, clogged with shoppers, street vendors and illegal drinking stalls that police prefer to ignore. Similarly, although negotiations between the government and the ANC are stalled, black civic associations throughout the region are engaged in tough bargaining with white local councils over such basic issues as control over taxes and services and, ultimately, the merging of black communities and neighboring white ones.

The new freedom has meant new divisions inside the black opposition. During the years in exile, the multiracial ANC dominated the resistance movement. But freedom to operate has exacerbated divisions within the ANC while giving fresh life to opponents such as the hard-line Pan-Africanist Congress and the Black Consciousness Movement.

The conflict was on display at the funeral in August of Tsietsi Mashinini, one of the legendary young leaders of the 1976 Soweto revolt, who died suddenly in Guinea just before he was due to return home.

Everyone claimed Tsietsi for their own movement, recalls his younger brother Mpho, who organized the funeral. There were endless meetings between factions to sort out who would speak at the funeral and carry the coffin. Even so, fistfights broke out during the traditional all-night vigil before the ceremony.

"I realized that it may be possible for the people at the top of these movements to become friends and form a united front," said Mpho Mashinini. "But meanwhile, the people at the bottom are killing each other."

The death of the old assumptions means many must reexamine their dreams. A black friend of mine, a senior manager in one of South Africa's biggest companies, spent years saving the money to build a modern, two-story house in Diepkloof Extension, one of Soweto's most prosperous neighborhoods. But now that the infamous Group Areas Act is about to be repealed, blacks may soon be able to move legally into previously all-white neighborhoods where services, schools and security are far better. Should he move?

Socialists must also think again. Khela Shubane, a 34-year-old activist, spent five years in prison on Robben Island for working as a clandestine ANC recruiter. Among his cellmates were militants who had been trained in the Soviet Union and who spoke glowingly of life there.

Last June, Shubane went to Moscow, thanks to Pretoria's vastly liberalized travel policy. It was an eye-opening experience, he recalls, especially seeing the long lines for food and other essentials.

"I had always believed the talk about food lines was Western propaganda, but there they were," he said. "I couldn't believe that a country that could build such sophisticated warplanes could not feed itself."

Shubane says he used to believe Soviet-style socialism was the correct model for South Africa. Now, he concedes, "the idea of a model has collapsed altogether."

Alongside the dream, the human erosion continues. In townships like Thokoza east of Johannesburg, scene of some of the worst black-against-black violence in recent months, the new South Africa looks very much like the one I left.

Residents for months have conducted a rent boycott and have recently refused to pay utility bills to protest the poor services they receive at premium prices from the white city government in nearby Alberton. Electricity has been cut off, huge mounds of garbage pile up and open sewage clogs the unpaved streets.

The only visible signs of official concern are the gleaming metallic coils of razor wire wound tightly around the periphery of the hostels -- bleak barracks for single males who pour into the cities from rural areas in search of work. Portuguese-speaking black soldiers from the much-feared 32nd Battalion that once fought in southern Angola ring the site. They stand between the hostel dwellers, who are largely Zulus and supporters of Chief Buthelezi, and Thokoza's permanent residents and nearby squatters, most of whom back the ANC.

Between August and October alone, more than 800 people died in this township and in others around the Johannesburg area as the power struggle between Buthelezi's Inkatha Movement and the ANC accelerated. The charred remains of burned-out hostels and squatters' shacks litter the landscape -- a backdrop of sorts for the January handshake between Buthelezi and Mandela.

"There's no winner in this kind of war," said Rich Mkhondo, a black journalist who lives in the area. "Many of those who died are young people. They've missed the chance to see another kind of South Africa."

Glenn Frankel is now the London correspondent for The Washington Post.