A judge ruled illegal today the firing of nearly 1,800 nurses and other staff at South Africa's biggest hospital for blacks after a protest demonstration 12 days ago. Hospital authorities told the union that all employes would be reinstated unconditionally.

The landmark judgment ends a crisis in the huge state-owned hospital, which has been run by the Army since the staff was fired Nov. 13.

The victory for the black nurses was tempered by an act of retribution in which one of them was fatally burned by young radicals after being labeled a sellout for applying to the hospital authorities to get her job back.

The student nurse, Nomthandazo Sishi, 23, died yesterday of severe burns sustained when a group of radicals set fire to her family's home in Soweto Thursday. Her mother, Gertrude Sishi, 53, died in the flames, and four other occupants were badly burned.

Today's judgment by provincial Supreme Court Judge Richard Goldstone follows another by a special industrial court last month that ordered a major mining house, Gencor, to reinstate 500 black miners who were fired for striking.

Goldstone's judgment applies to state employes, who fall outside the Labor Relations Act that covers private-sector employes and who are prohibited by law from striking. Goldstone ruled that they, too, may not be fired all together but should have their cases considered individually.

Lawyers and labor specialists said the two judgments together would bring to an end the practice long popular with some white employers in South Africa of wholesale dismissals, followed by selective rehiring during which black workers regarded as troublemakers are weeded out.

"This was a test case and what we have is a breakthrough judgment that will have an important effect on labor practices in South Africa," said lawyer Chris Loxton, a member of the nurses' legal team.

Trouble broke out at Baragwanath Hospital in Soweto, reputedly the biggest hospital in the Southern Hemisphere, when about 800 cleaners and other auxiliary workers staged a protest demonstration over a delay in their request for a wage increase and the hospital authorities called in the police.

According to their labor union, the Allied and General Workers Union, the hospital workers are paid between $42 and $65 per month, and they were angered when the hospital authorities told them their request for an increase would not be considered until next March.

The arrival of the police to break up the demonstration sparked a riot.

The hospital was closed to television, radio and newspaper reporters under new media restrictions, but eyewitnesses said the angry workers rampaged through the hospital smashing crockery, overturning food trolleys and flinging food on the floor.

A second confrontation occurred that night when about 900 student nurses, who had long been protesting against an 8 p.m. curfew in the residence where they live, also demonstrated.

According to witnesses, hospital security guards charged with batons, and eight protesters were injured.

More than 700 nurses and other workers were arrested after the clashes. Nearly 1,800 went on strike in protest. Citing a law that says state employes, especially in essential services, may not strike, the hospital authorities fired them all and called in the Army to run the huge hospital. It has 2,700 beds and 17 operating theaters, serving nearly 2 million black people in the Johannesburg area.

As tension rose in the sprawling complex, 500 doctors and other senior medical staff threatened to join the strike if the fired nurses and cleaners were not reinstated.

They did so knowing that they were likely to be fired, too, if they carried out their threat. The issue was stalled there as the union sought a court ruling on the case.

According to the union, about 200 applied for reinstatement. The hospital authorities said 600 did.

In his judgment today, Goldstone said each of the dismissed workers "as a matter of natural justice" was entitled to have his case considered individually.

He added that while it was clearly "unsatisfactory" for nurses to strike, endangering the lives of many, hospital authorities had a reciprocal duty to ensure that their grievances were heard readily.