SEBOKENG TOWNSHIP, SOUTH AFRICA, SEPT. 4 -- At least 36 people were killed and 94 hospitalized in this black township south of Johannesburg today in a pre-dawn attack on a workers' hostel. The attack, according to witnesses, was by armed members of Zulu Chief Mangosutho Buthelezi's Inkatha movement and was supported by police units.

Nine of the dead were shot by a unit of the South African Army that was called in to support the police when angry hostel dwellers surrounded a courtyard in the hostel complex, preventing the Inkatha attackers from escaping.

The other 27 were shot and hacked to death by the Inkatha band that began its attack at 2:30 a.m. with machetes and automatic rifles, hostel dwellers said.

Police later arrested 113 of the attackers, including Themba Khosa, Transvaal chairman of the Inkatha Youth Brigade and a prominent spokesman for Buthelezi's movement.

As black outrage mounted in the area, Nelson Mandela, deputy president of the African National Congress, and Adriaan Vlok, Minister of Law and Order, paid separate visits to Sebokeng to investigate the killings. The deaths occurred only three days after an official commission of inquiry had publicly rebuked the police for opening fire without justification on a crowd of black demonstrators in the same township last March, killing 12 and wounding 281.

After talking to police officials in the area, Mandela lashed out at what he called the misconduct of the troops. There was no reason that violence should have been used, he said, adding that the shootings were "the action of an army that regards any demonstration by blacks as a declaration of war against white supremacy."

Vlok refused to talk to reporters, but security force sources said later that he had ordered a departmental probe into the police role and that a military board of inquiry had been appointed to investigate the shootings by the army unit.

Meanwhile, President Frederik W. de Klerk, by coincidence chose today to make his first visit to Soweto, the sprawling ghetto township outside Johannesburg, saying it was the start of a national tour of trouble spots that were disrupting his attempts to negotiate with the country's black leaders toward an end to apartheid.

Among other things, de Klerk saw and expressed shock over a migrant workers' hostel that had appalled Sen. Edward M. Kennedy (D-Mass.) during a tour of South Africa in January 1985.

De Klerk was the first member of a South African government ever to visit one of these dingy, barrack-like buildings that house migrant workers from the black, tribal "homelands" -- the nominally independent regions set up by the white-minority government with the aim of keeping blacks separated from the rest of the country.

Living conditions in the migrant workers' buildings have contributed to the recent outbreak of violence in the Johannesburg area that has pitted supporters of the Zulu-based Inkatha movement against supporters of the ANC, whose members tend to be from the Xhosa tribe. The strife is believed by some analysts to stem from a mixture of tribal and political rivalry.

"It is absolutely unacceptable what we saw here today. We can't allow it to continue," de Klerk told reporters as he left the dank hostel with its long corridors stinking of urine. Minister of Health Rina Venter accompanied the president on his tour.

The hostel in Sebokeng, where today's violence occurred, is a similar establishment with a series of long, low bungalows containing bunks for men only. The buildings are set in a wide, dusty complex covering about 10 acres, with not a blade of grass or a flower bed in sight.

The area was packed with an angry crowd of about 10,000 people, mostly men, waiting for Mandela to come and tell them how they should respond to the attack that had disrupted their lives in the pre-dawn darkness.

Many talked of revenge and fingered homemade weapons that they said they would use to defend themselves if they were attacked again tonight. There were long machetes, sharpened iron rods, and a makeshift crossbow.

The mood was volatile. Some reporters were welcomed, others threatened, and one had his car stoned, overturned and set on fire as he entered the township.

Reporters who reached the hostel gathered scores of eyewitness accounts of the attack that gave them the most comprehensive testimony so far assembled of Inkatha aggression and police connivance in the internecine violence that has claimed more than 550 lives in the Johannesburg areas during the last four weeks.

The Sebokeng hostel is one of only a few in Transvaal province where Zulu Inkatha supporters are in a minority.

According to Bavumile Vilakazi, a representative of the ANC in the Sebokeng region, the first wave of Inkatha-ANC violence that struck this area July 22 resulted in the Zulu minority being driven out of the hostel.

However, peace talks between the two black movements and the local police resulted in an agreement that the Inkatha Zulus should return. "We felt that was the only way to stop the hostel being a target," Vilakazi said.

Part of the agreement, he said, was that the police would patrol all hostels in the troubled area to prevent further attacks. But Monday night there was no patrol. Vilakazi said the police have failed to give a satisfactory explanation why the patrol was withdrawn.

James Maphakisa, a Sebokeng resident who lives near the hostel complex, said he was awakened about 2:30 a.m. by the sound of gunfire coming from the hostel.

Maphakisa said he ran out to investigate and saw men wearing white headbands and running along the rows of hostel dormitories, firing automatic rifles. A car, a truck and a minibus were parked in the courtyard, all without registration plates.

Samson Makhalemele, an ex-policeman who works as a hotel security guard, said the Inkatha attackers tried to wrench loose the burglar bars on the windows of his section of the hostel. When they failed to loosen the bars, they broke open part of the roof to gain entry.