At dusk a pall of smoke from a thousand coal fires hangs low over this unlighted black township on Johannesburg's northern outskirts, giving Alexandra its sobriquet of the "dark city."

The white visitor must negotiate the rutted dirt streets with special care, lest in the gathering gloom he drives into what his black escort has casually described as a "tank trap" -- a ditch three feet deep across the roadway.

The trenches have been dug by young black activists to stop the big Casspir armored personnel carriers in which the police patrol the ghetto's shabby precincts. They give the appropriate impression of a battlefield, which is what Alexandra has become over the past two weeks as activists and security forces have engaged in a deadly struggle for control of the township.

The "tank traps" are not the only new feature of this latest clash in South Africa's racial conflict. This time the activists are on the defensive, and forces who appear to enjoy the backing of the authorities are attacking such institutions of public administration as exist in Alexandra.

The first battle of Alexandra took place last February. Four days of violent clashes ended with 22 activists shot to death. The activists in turn launched attacks on black council members and policemen, who are labeled as "collaborators" and "sell-outs" in the language of the antiapartheid revolution.

The so-called collaborators' homes were firebombed, resulting in several injuries. At least one policeman was killed, his body soaked with gasoline and set on fire in the street outside his house.

In the weeks that followed, all locally resident black policemen were withdrawn from Alexandra and accommodated with their families in temporary camps adjoining police stations.

Six members of the nine-man township council resigned. Only Mayor Sam Buti and two other council members remained nominally at their posts.

On April 22, these three resigned as well, leaving Alexandra with no local government at all. The declared objective of the activists to make the townships "ungovernable" had become a reality here, as in several other areas.

By then the activists -- mainly members of two community organizations called the Alexandra Civic Association and the Alexandra Action Committee -- had established a kind of authority of their own in the power vacuum that had been developing since February.

They had organized residents into "street committees" that were beginning to establish a rudimentary form of administration. The committees were organizing anticrime patrols and had established a series of "people's courts" to mediate in disputes, dispense crude justice and enforce compliance with decisions for collective political action.

Within hours of Buti resigning, a large contingent of police and troops moved into Alexandra. They set up camp in the township's only sports stadium, and the big armored Casspirs began patrolling the streets.

That night posses of armed men, wearing balaclavas to conceal their faces, launched a series of attacks on the homes of civic association and action committee leaders and their families. Residents claim policemen had taken it on themselves to form unofficial vigilante groups.

By next morning, according to activist sources, 11 residents were dead. The second battle of Alexandra had begun. This time, in the opinion of local observers, it was an attempt by the authorities to break the degree of control that the activists were beginning to establish over the township.

According to Michael Beea, chairman of the civic association, his wife, elderly mother and three small children were among those attacked. In a reversal of roles, Beea, action committee chairman Moses Mayekiso and members of their committees have gone into hiding.

In an interview at his hideout last week, Mayekiso said the "people's courts" were still operating, but had "virtually gone underground."

The activists are fighting back. The day after the initial attacks the United Democratic Front, a broad alliance of activist movements, openly accused the police of responsibility for the killings and called on Alexandra residents to organize a home-guard militia system.

As police confronted a crowd after a protest meeting in Alexandra that afternoon, a Russian AK47 automatic rifle barked suddenly from within the mob and a white officer fell screaming to the ground, wounded in the stomach.

Official reaction has been low-key. Law and Order Minister Louis le Grange said in the Cape Town parliament this week that the allegations of police involvement in the attacks would be investigated.

Meanwhile, the heavy security force presence and the vigilante attacks continue. Last Monday another vigilante group reportedly made a predawn grenade attack on a house, killing four young activists. As the week ended, the unofficial casualty toll stood at 18 black residents and one policeman dead, with at least three other police officers wounded.

These events are part of an emerging pattern of attacks by black vigilante groups, apparently aided by the authorities, against activists in a number of townships and tribal "homeland" areas, and of retaliation by the activists using increasing numbers of weapons.

Numbers of AK47s and hand grenades are finding their way into the townships. Last Monday someone with an AK47 opened fire on a police spotter helicopter as it hovered over a funeral crowd in Tembisa township, east of Johannesburg.

Nicholas Haysom, a lawyer, has just published a book entitled "Apartheid's Private Army," which catalogues allegations of vigilante attacks gathered by field workers of four civil rights organizations in various parts of the country.

Haysom claims there is conclusive evidence that the white administration is recruiting and training politically conservative blacks into a private army to attack and neutralize the popular black organizations. He contends that the strategy has the additional advantage for the white administration of giving outsiders the impression of growing dissension in the black community.

Haysom says the field workers have identified at least eight major vigilante groups, including one called Amabutho that is allegedly linked to the Inkatha movement of Zulu leader Chief Gatsha Buthelezi. Many whites regard Buthelezi as a moderate alternative to the outlawed African National Congress, which most of the activists covertly support.

Buthelezi denies Inkatha's involvement, counterclaiming that the vigilante attacks are a natural response to the violence of the activist groups.

At a recent press conference, Mayekiso described how his action committee -- an organization consisting mainly of militant young students commonly known simply as "the comrades" -- had set about establishing control over the township through a cell system based on a plan devised but never used in the 1950s by Nelson Mandela, the imprisoned leader of the African National Congress.

Local "yard committees" were formed for each cluster of shanties in the run-down township, Mayekiso said, with a "street committee" for each road.

Coordinating them all is the action committee itself, made up of one representative from each street committee.

The role of the committees, Mayekiso explained, was to "conscientize" the local residents -- a vogue word meaning to "educate" them in the ideals of the "liberation struggle."

According to Mayekiso, with the police now regarded as "the enemy," residents are taking their complaints of local crime and personal disputes to the committees rather than to police stations. This made it necessary for the committees to double up as "people's courts."

The punishments meted out by these courts are a sensitive issue. Questioned on the subject, Mayekiso was less than forthright in his replies.

"It is a difficult problem," he said. "We haven't fully decided about it yet. At the moment we only mediate. We use persuasion. We haven't passed any sentences yet."

Other sources report differently, citing allegations of people being sentenced to flogging with a heavy lash made from animal skins, and even of some being sentenced to death by the "necklace" execution, in which a gasoline-filled tire is pulled over the victim's body and set on fire.

Mayekiso strenuously denied this at the press conference, but it is a matter of record that the room where the main "court" sits has two painted automobile tires on the wall.

"They are just there for decoration," Mayekiso said.

Later another committee member offered what seemed a more convincing explanation. "Everyone has heard about the comrades burning people with necklaces," he said. "That makes them scared so we don't have to do it."

"We disapprove of the necklace," the committee member said. "It's only some wild elements who do it. We try to discipline them -- but sometimes their militancy is useful."

Beea's civic association, made up of older, middle-class blacks, publicly supports the action committee but stands somewhat apart from it. While an undertone of disapproval can be sensed, the association also seems to find the greater militancy of the student movement useful.