Charges under South Africa's wide-ranging terrorism act have been dropped against two black labor union leaders who have been detained seven times during the past 2 1/2 years, thus ending legal proceedings against 19 unionists detained in a major roundup of activists connected with emerging black unions last November.

Thozamile Gqweta and Sisa Njikelana, president and vice president respectively of the South African Allied Workers Union (SAAWU), have been in detention for nearly a year altogether since they founded their "Mass Workers' Movement" in mid-1980.

During their most recent detention, Gqweta and the union's general-secretary, Sam Kikane, were admitted to a hospital for psychiatric treatment along with four other political detainees.

Both said the hospitalization was necessary because they had become disoriented from electric shock torture, but the security police deny they were mistreated in any way.

Gqweta was released from detention in March, and Njikelane and Kikane were freed in August. All were charged under the Terrorism Act, but the charge against Kikane was withdrawn in September. Gqweta's and Njikelane's charges were withdrawn recently.

None of the 19 unionists detained in the roundup last year has been convicted.

In a series of statements at the time, the minister of law and order, Louis Le Grange, said the unionists were being detained for subversion, not for their union activities, and he promised a major show trial within a short time.

No trial materialized. Instead the security police operation gradually fizzled into a fiasco.

Ten of the 19 unionists were released with no charges brought against them, three have had the charges against them dropped, four were released and then served with restrictive banning orders, one was tried and acquitted and one, Neil Aggett, died in detention.

Aggett's death has been the subject of a drawn-out inquest during which the lawyer for his family, George Bizos, claimed he was driven to commit suicide by police brutality and torture.

Bizos suggested the security police became desperate when they could not obtain the evidence needed for the trial Le Grange had promised and resorted to brutal interrogation methods.

The police denied this, claiming Aggett hanged himself because he made a statement incriminating friends.

Njikelana was among the detainees who testified at the inquest. He said in his testimony that he was beaten and given electric shocks.

An inquest decision is expected to be handed down Dec 20.

While the three allied union leaders were in detention, the union was evicted from its headquarters in East London, a traditionally militant port city in Eastern Cape Province. It had difficulty finding other offices and has still been unable to get a telephone.

Despite the harassment, Kikane said in an interview earlier this month from his office in Durban, where he at least has a phone, that the union was still active and undaunted.

"In fact it has given us a hell of a boost," he said. "The sight of us being harassed has improved our image among black workers, and we have increased our membership by 10,000 over the past year."

The union now claims a national membership totalling 95,000, most of which is located in East London and the Natal port of Durban.

It is a general union and Kikane claims it has labor agreements with 20 companies engaged in a variety of industrial activities.

Although black unions have existed in South Africa since 1917, they only became legally recognized after legislative reforms in 1979.

Since then, the black labor movement has expanded steadily, but in the face of an ambiguous response by the government.

Pretoria wants to permit the unionization of the increasingly sophisticated black labor force but fears the emerging unions may become Trojan horses for the black political underground, particularly the banned African National Congress.

This accounts for the intense security-police surveillance and the harassment of the more militant unions such as the allied workers.

The large-scale detentions a year ago were clearly made in the belief that they would uncover connections between some of these unions and the African National Congress, but they failed to do so.