In the bloodiest clash so far between black insurgents and police in a South African city, seven men described as guerrillas of the underground African National Congress were shot dead today in a street gunfight in one of Cape Town's segregated townships.

Two white policemen were wounded as the guerrillas fought back with automatic rifles, hand grenades and pistols, according to a police account.

It was the first time black guerrillas have appeared near Cape Town, South Africa's southernmost city and farthest from the neighboring black states through which insurgents have infiltrated from training camps in Angola and Tanzania.

Local observers saw the incident as indicating that the ANC was stepping up its low-level insurgency war against white-minority rule.

They also noted apparent strong support for the guerrillas among the local black community as an angry crowd of several hundred gathered in Guguletu township after the shooting and shouted abuse at the police as they sluiced the victims' blood off the sidewalks with buckets of water.

Later a smaller group of black youths stoned a truck at the scene of the battle, but scattered when a police car raced back with two officers firing shots in the air.

The gunfight occurred when the police, who say they were tipped off that a guerrilla unit planned to ambush a police vehicle, themselves ambushed the would-be attackers at a street corner.

"Certain precautionary measures were taken beforehand," said the commissioner of police, Gen. Johan Coetzee. After the shootout, witnesses told reporters -- who were prohibited from entering the township -- that the police operation gave the impression of having been carefully planned.

According to a police account, the guerrillas pulled up at the street corner in a van and were preparing to set up their ambush when a police officer slipped out of a waiting car and challenged them with his service revolver.

One of the guerrillas threw a hand grenade at the police car, but it bounced away before exploding, the account went on, and a policeman was wounded by the blast.

A police task force in backup vehicles raced into the street, and a gunbattle followed that witnesses said lasted more than five minutes.

One eyewitness described how a guerrilla opened fire from behind a tree with a Soviet-designed AK47 automatic rifle, shattering the windows of a police car and wounding a policeman before the rebel was gunned down.

Neither the account by witnesses nor that by police made clear whether any guerrillas escaped. There has been no immediate reaction from the ANC's exile headquarters in Lusaka, Zambia. The organization has said in the past that it requires several days to get reports from its operational units in South Africa.