Rioting continued for the third consecutive day in Durban's black townships today, and unofficial estimates put the number of dead at 24 with 160 injured, making it one of the worst outbreaks of violence in 11 months of almost continuous unrest.

Asian families fled for their lives as black mobs again invaded their townships -- burning shops, looting homes and adding a complex dimension to the violence that is wracking South Africa's racially divided society. Police said tonight that parts of the Asian townships had become "no go" areas and 2,000 Indians had taken refuge in a community hall.

The unrest also showed signs today of spreading to Cape Town, where police clashed with a column of 1,000 black, white and mixed-race students trying to march on President P.W. Botha's official residence to protest the government's declaration of a state of emergency 18 days ago. Several students were injured and 20 were arrested.

Botha, who is on an official tour of several of the tribal "homelands" established under the government's system of racial separation, said today he had no intention of extending the emergency "at this stage," although he stressed his willingness to do so "if necessary."

In some of the emergency areas, however, the government announced regulations to break school boycotts in the populous Witwatersrand and eastern Cape Province regions that make it a crime for schoolchildren to be out of classrooms during school hours.

In an attempt to stop the making of gasoline bombs, a favorite weapon of the rioters, it has also been made a criminal offense to possess gasoline except in an automobile tank.

A 10 p.m.-to-4 a.m. curfew has been imposed on some townships in eastern Cape Province, the region most affected by the unrest, and nonresidents have been banned from them.

According to one account, the main violence in the Durban townships began yesterday when a group of Zulu supporters of Chief Gatsha Buthelezi's Inkatha movement clashed with a crowd of United Democratic Front (UDF) supporters at a memorial service in Umlazi for Victoria Mxenge, a civil rights lawyer and leading member of the UDF who died in an execution-type killing last week. Zulus represent by far the majority of blacks in the Durban area.

A black reporter who was there said about 400 Inkatha members armed with sticks and spears fought with the crowd of about 4,000 and that many of the deaths occurred during this clash. Inkatha and the UDF are longtime ideological foes.

Young members of the crowd went on a rampage after the fight, burning shops and looting houses, the reporter said.

Police used shotguns, rubber bullets and tear gas to try to quell the rioting, which in many areas spilled over into a number of adjacent Indian townships where the rampaging mob set fire to vehicles and flung gasoline bombs through windows.

Many Indians loaded their families into trucks and fled, leaving their homes in flames, but some returned with guns and formed vigilante groups to guard what was left of their property.

Some young blacks were reported tonight to have hijacked buses and to be roaming the streets of the Indian townships hurling gasoline bombs through windows. At least 30 Indian homes and scores of shops have been destroyed.

The attacks on the Indians and the deadly rivalry between supporters of Buthelezi's Inkatha and the United Democratic Front point to a set of conflicts in Natal that is even more complex than in other parts of South Africa.

There is also a history of sporadic conflict between the province's black population and the Indians, many of them wealthy traders descended from indentured laborers brought to Natal in the 19th century. Although the Indians outnumber the whites there, they are less than half as numerous as the blacks.

Tensions between the groups have increased since Indians a year ago were granted a form of parliamentary representation under a new constitution that excluded blacks. There was a grenade attack last week on the home of Amichand Rajbansi, leader of the major Indian party in the new Parliament and a member of the Botha Cabinet.

Offsetting this is the fact that South Africa's Indian National Congress, a lineal descendant of a movement founded by Mohandas K. Gandhi when he lived here early in this century, has long associated itself with the black nationalist cause and is today an affiliate of the UDF.

Many of its leaders have been arrested during the current emergency, and some are among the accused facing charges of high treason in the provincial Supreme Court in Pietermaritzburg.

Complicating the conflict between the UDF and Inkatha is the fact that several of the big black townships outside Durban, including Umlazi, where some of the worst unrest has occurred, fall within Buthelezi's Kwazulu tribal homeland and are administered by him.

The UDF is strongly opposed to the homelands system, regarding it as part of the apartheid structure of racial discrimination.

A feature of the unrest has been the many attacks that the activists have made on black council members and other township administrators in their efforts to render "the system," as they call it, unworkable.

When these attacks take place in the Durban townships, as they have over the past three days, it is members of the Kwazulu administration who are the targets. This puts the UDF into violent conflict with Inkatha.

Buthelezi has reflected this widening rift in several angry attacks on the UDF over the past three days, and today he met with Law and Order Minister Louis le Grange to discuss police action against the rioters.

In a strong attack on the UDF today, Buthelezi accused the organization of promoting a program of "self-laceration" in the black community that he said was adding to their misery. "It is hogwash to present this kind of political thuggery as the black liberation struggle," Buthelezi said.

Billy Nair, a leading Asian member of the UDF in Durban, denied that the organization was responsible for the violence, blaming it on "irresponsible and criminal elements" who were exploiting a situation of public anger.