JOHANNESBURG -- While South Africa prepares for major political changes, its citizens face equally momentous social adjustments. Millions of rural blacks are expected to move to cities in the coming years in a wave of urbanization that could lead to squalid conditions for the newcomers and pose formidable problems for future black governments.

A number of recent demographic studies show that the combination of black population growth and distortions caused by decades of social engineering under apartheid, the system of racial separation, has created conditions for one of the world's fastest urbanization rates.

By the end of this decade, all of South Africa's major cities will double in population, according to the studies.

They predict that the complex of cities bounded by Pretoria in the north, the Witwatersrand area with Johannesburg at its hub, and Vereeniging in the south -- commonly called the PWV -- will become an overwhelmingly black megalopolis bigger than Los Angeles.

Ten years later, in 2010, it will have a population of 16.5 million, roughly the present size of Mexico City. Both Durban and Cape Town will have populations of 7 million, the size of today's PWV, by the end of the 1990s.

The demographers warn that this huge influx of people cannot be accommodated in conventional housing. Most will have to live in sprawling squatter camps in and around the cities, they say.

This process already has begun. A flight over any South African city will reveal a belt of densely packed squatters' areas, where hundreds of thousands of people must shelter themselves with cardboard, corrugated iron and plastic sheeting. Shanties spring up overnight on any vacant space: in back yards, on golf courses, in parks, along riverbanks, even in graveyards.

The Urban Foundation, a respected, business-backed development organization that has done the most recent and detailed of the demographic studies, estimates there are 7 million people living in such "informal housing," more than 2.5 million of them in the PWV. Those figures, the foundation warns, will double in the next five years.

At the same time, more blacks will move into conventional city housing as apartheid breaks down but before it formally is abolished. This, too, already is happening. Sixty percent of people living in central Johannesburg are black.

"The effect of these two processes will be to create a city fundamentally different from anything South Africans have yet experienced," said Ann Bernstein, the foundation's director.

For whites brought up under apartheid, which for generations propagated the idea that cities were only for whites and that blacks belonged in distant, so-called tribal homelands, the transformation is going to be a cultural shock -- greater even, some observers say, than the adjustment to black-majority rule, which negotiations for a new constitution could create.

Indeed, the growing black urban population already may be helping to feed the white extremism that is threatening to derail the process of political transition initiated by President Frederik W. de Klerk.

While the sudden surge of the right wing is primarily a reaction to de Klerk's political reforms, Frederik van Zyl Slabbert, a former parliamentary opposition leader who is now a professor of politics, said it is partly also "a resistance to the inevitable de-Europeanization of urban life in South Africa," which is likely to intensify as the black urban population increases.

"This decade will see the end of the colonial lifestyle in our country, and it will not happen without some trauma," Slabbert said.

South Africa's political transition is expected to come about much faster -- some analysts predict about four years -- than the demographic trend, which is seen likely to play itself out over the next 10 to 30 years. Much of the urbanization, therefore, likely will become a post-apartheid social problem confronting future black governments.

But the Urban Foundation's Bernstein and other demographers worry that the slowness of the present white-minority government to plan for a process already underway could needlessly allow cities to become "chaotic nightmares," as Bernstein put it. Properly managed, demographers say, the rapid urbanization could be turned to South Africa's advantage, helping to uplift blacks economically, thereby stabilizing population growth.

The Urban Foundation's study, published earlier this month, is the most up-to-date in a series of academic and other demographic studies that point to the same trend.

The Urban Foundation was established with grants from liberal-minded, predominantly white businessmen after the 1976 Soweto riots to study ways to lessen racial tensions by improving the urban environment for blacks.

The foundation has published many studies of urban problems and launched development projects in black areas. It is seen as an authority on black urban problems in the country and is used by the British government as the channel for its development aid to black townships.

The demographic studies emphasize that even without apartheid, South Africa would face an urbanization crisis. But apartheid has made it more severe by forcibly keeping blacks in rural areas. These blacks have wanted to move to cities for years to improve their economic situations but have been prevented by apartheid from doing so. They now are expected to migrate to the cities as the walls of racial segregation come down.

The main factor is a growth in population caused by a birth rate among blacks that is significantly higher than their death rate. This nation has Africa's most developed economy and health services, and one result is that the black population's death rate has fallen faster than its birth rate.

This phenomenon is common to all societies that have reached South Africa's stage of development, the demographers say, and it will continue until improved living standards for blacks causes their birth rate to taper off.

That means South Africa's population growth is currently in a steeply rising phase that demographers predict will not flatten out until about 2020, by which time the black population will have grown from today's 28 million to more than 70 million, 80 percent of it urbanized.

The white population, meanwhile, will decline. As in economically developed societies of the United States and Western Europe, the white population is shrinking -- in South Africa's case, at 0.9 percent a year. The political changes underway will lead some whites to quit the country, and others may leave because of difficulties in the cities caused by their growth.

Blacks used to outnumber whites 4 to 1. Now the ratio is 5 to 1. Based on the studies, by the end of the decade, it will be nearly 8 to 1, and in 2010 more than 9 to 1. At that stage, the white Afrikaners who now rule the country will make up only 5.8 percent of the population.

The distortions caused by apartheid do not affect the population growth rate, but the studies show that they are accelerating the urbanization rate and making it more difficult for the cities to cope.

During the early years of white settlement, blacks were dispossessed of most of their land, and the basis of their traditional subsistence economy was almost destroyed.

Strict legal controls prohibited this landless peasantry from moving to the cities, regulating the number of migrants to suit the labor needs of white industrialists. Large numbers lived in small tribal reserves or worked as low-paid laborers on white-owned farms.

With the advent of apartheid in 1948, these controls were intensified in an attempt not simply to limit the flow to the cities but to reverse it. The aim was to contain the bulk of the black population in tribal reserves so the main part of South Africa could be regarded as a white country.

Hendrik F. Verwoerd, chief architect of the apartheid policy and prime minister in the early 1960s, decreed that blacks were "temporary sojourners" in cities, to be accommodated in segregated townships that would wither away as the blacks were drawn back to their homelands.

As a result, the provision of housing in the black townships was slowed and in some cases stopped. Also, millions of blacks were moved out of cities to the homelands.

At the same time, mechanization put millions of farm laborers out of work and they, too, moved to the homelands because the law prohibited them from going to the cities or settling in other rural areas.

This caused massive overcrowding and ecological devastation in the homelands, further reducing what little subsistence agriculture was possible there.

As a result, the swelling numbers in the homelands became dependent on the cities they could not live in, subsisting on money remitted by relatives working there.

When the government finally recognized that its separatist goal was unattainable and lifted the influx control regulations in 1986, this dammed-up rural poverty began to move into the cities. But there was no housing to accommodate it.

The Urban Foundation's study estimates that between the ending of the controls and 2010, the population of the metropolitan areas will increase 270 percent.

This confronts the country's rulers with a stark choice. "Are our cities going to be overwhelmed, or are we going to harness the inevitable process of growth and urbanization so as to manage it productively?" asked Bernstein.

Bernstein argues for welcoming urbanization as "the vehicle of modernity."

Noting that poor people do better in cities than in the countryside, the foundation argues that urbanization, if properly managed, will accelerate the population's economic development, which in turn will reduce its birth rate.

By proper management, the foundation means that city governments must stop trying to halt the influx of blacks by bulldozing their squatter camps, as they are doing now almost daily, and try to oversee their growth instead. It recommends the demarcation of areas where city governments would provide water, electricity and toilet facilities, then leave the squatters to build their own shacks, to be upgraded over time.

"The squatters are in fact South Africa's new city builders," Bernstein said.