Armed riot police shooting tear gas and swinging batons raided an illegal Cape Town squatters' camp yesterday and witnesses said three blacks were killed, including an infant trampled to death by fleeing women.

Brig. J. F. Rossouw, the police commander in the area, said his men had to open fire and use the tear gas because some of the Crossroads camp's 20,000 residents attacked with stones, bricks and sticks during what he called a "crime-preventive" raid.

The early-morning clash marked one of the most violent racial incidents in South Africa in recent months. It underlined government concern over the thousands of rural blacks moving into the mainly white cities despite laws barring those without specific permits.

Police confirmed only the death of one man. But witnesses said a second also was shot dead during the raid.The baby, they added, fell from an African-style sling on its mother's back and was trampled underfoot by women scattering to escape tear gas.

Hundreds of squatters were arrested and several were admitted to hospitals, according to reports from Cape Town. Police beat several residents and knocked down doors of some of the 3,000 corrugated iron shacks to find people, said the reports attributed to witnesses.

Among those arrested were a Roman Catholic priest, a Methodist minister and five white women who worked among the squatters.

The raid was aimed at checking passes of the black squatters. Under South Africa's system of migration control, all blacks must carry passes allowing them to live and work in cities. These must be presented on demand by police and those without a valid pass are subject to a fine or jail sentence.

According to social workers involved with Crossroads, the police move was designed to intimidate Crossroads squatters into vacating their shacks and returning to tribal homelands, or black reserves designated for them by the government. The police action is a prelude to demolition of the camp - by bulldozing if neccessary - which the government says will be done sometime in the next six to eight weeks.

Colin Eglin, leader of the opposition Progressive Federal Party, criticized the police action.

"It appears the government is applying a policy of continual harassment in an attempt to destroy the spirit of Crossroads before it sends front-end loaders to destroy homes. My appeal to the government even at this late stage is to stop before it does irreparable harm to South Africa."

[In Washington, the State Department said the United States has "explicitly expressed our concern to the South African government about its plans to demolish Crossroads.]

["We deeply regret the South African government's intention to press ahead with destruction of a functioning community of some 20,000 people, which will lead to massive family separation of blacks living in the Cape Town area," a State Department spokesman said in response to a query.]

Like its predecessors - Unibel demolished in January and Modderdam, torn down one year ago - Crossroads is an example of the government's preoccupation with stemming and even reversing the flow of poor rural blacks into urban centers.

Most of the 250,000 squatters in the 47 squatter communities around Cape Town are "coloreds," or persons of mixed race. Since the all-white minority government has designated the western part of Cape Province as a preferential area for the 2.5 million coloreds of South Africa, they are allowed to remain until housing is available for them.

But under South Africa's policy of apartheid, or racial separation, black squatters are a different matter.

Government officials say allowing illegal black workers and their families to remain in the Cape Town area works to the disadvantage of coloreds and other blacks legally in Cape Town because the squatters push down wages and squeeze them out of jobs. More importantly perhaps, allowing black squatter communities would be an implicit relaxation of the migratory controls. Authorities fear this would herald an ever-increasing permanent black population in the western Cape.

Frikkie Botha, chief commissioner of black affairs in the western Cape, charged that clergymen and social workers encouraging squatters to defy the government 'want to open the gates of Cape Town to all who wish to come here from the black states."

Do they "have in mind another piece of land for the next 20,000?" he asked.

Under the government policy of separate development, South Africa's 18 million blacks are to have citizenship in nine black homelands, which eventually will become independent black states. Carved up into jigsaw shapes and lacking any major industrial or urban area, these states will likely remain economically dependent on the white-controlled economy of South Africa.

At present, blacks in rural areas who want a job in the city are supposed to enter into a one-year contract at the government labor office in their home town. Then, without their families, they are to live in all-male government hostels in segregated black neighborhoods of the white cities.

For those who come to Cape Town without a contract, or without a valid pass, and for those who dod not want to live without their families, squatter communities like Crossroads are the natural outlet.

Crossroads began to sprout three years ago on a sandy V-shaped plot of land at the intersection of two roads. Today it has two schools, two clinics, a community center with a wall-to-wall carpet, two churches and its won primitive form of local government. Eighty percent of the heads of households are employed full time, earning an average of $40 a week.

Although the iron shacks placed along twisting dirt passages are less sturdy than those built by the government in approved areas, residents are so proud of what they have built, themselves, they say they would refuse a government house if it were made available.

Urban researchers at local universities and even progovernment groups point out that demolition of the squatter communities is not the answer to controlling the black influx to cities.

"The 20,000 or so souls who will be homeless will neither depart for some far-off homeland, nor will they vanish into thin ar," the foundation's newsletter commented.

It urged the government to "let them stay in their shanties and demolish the worst of them progressively as permanent housing become available."

The residents of Crossroads are displaying an almost guerrilla-like attitude to staying. "We have got no plan" if the demolition goes ahead, said 43-year-old Nomlingqanisela Ntongana. "We are just going to look for another bush to live under. We will move from bush to bush, we come from the bushes so we're used to them."