Magistrate Petrus J. Kotze cleared South African security police of any responsibility in the death in political detention of labor union activist Neil Aggett today, following an eight-month inquest during which witnesses for Aggett's family charged he had been driven to suicide by brutal police interrogation.

In a judgment that drew angry criticism from union members and civil-rights campaigners, Kotze accepted denials by Aggett's captors that they mistreated him in any way and rejected as untrustworthy the testimony of 10 fellow detainees who said they were themselves tortured and saw Aggett's condition deteriorate during a period of intensive interrogation before his death last February.

While clearing the police of blame, Kotze said "moral responsibility" for Aggett's suicide by hanging lay with one of his fellow-detainees, Auret van Heerden, for not alerting police immediately about a deterioration he had noticed in Aggett's condition.

Van Heerden, who was in the cell opposite Aggett at security police headquarters in Johannesburg, testified that Aggett "looked like a zombie" the night before he died and said he decided to tell the officer in charge of interrogations the next morning that he feared the white union activist might attempt suicide.

Kotze said Van Heerden had a "moral duty" to raise the alarm immediately. However, his moral dereliction was not sufficient in law to make him criminally liable for Aggett's death, he ruled.

No one could be held responsible for the suicide, Kotze said.

The magistrate upheld the security police contention that Aggett hanged himself in a moment of guilt-ridden depression because he had made a four-page statement to them which, they said, contained the names of colleagues involved in subversive activities.

These four pages were not submitted to the court. The lawyer for the police, Pieter Schabort, said they were "privileged documents" whose contents could not be disclosed for security reasons.

The Detainees' Parents Support Committee, a protest group that has been documenting allegations of security police torture, noted that more than 50 persons--of whom Aggett was the first white -- have died in security police detention and that in no instance have the inquest courts -- presided over by government-employed magistrates -- attributed responsibility.

Kotze took more than eight hours to deliver his judgment, spread over two days. He seemed intent on averting criticism of the type leveled at the magistrate who exonerated the security police at the inquest on Steve Biko, the black consciousness leader who died of brain damage in detention in 1977. In that case, the magistrate took two minutes to deliver his verdict.

Radical young unionists and some of South Africa's security police interrogators rubbed shoulders in the courtroom for today's verdict in a case that has captured international attention.

Aggett's parents, Aubrey and Joy Aggett, sat only a few feet from the two men they believe were responsible for their son's death, Steven Whitehead, who directed Aggett's interrogation, and Arthur Cronwright, the officer in charge of interrogations.

The Aggetts' lawyer, George Bizos, had asked Kotze to find that both should be charged with culpable homicide (manslaughter).

Afterward Aubrey Aggett said he was "bitterly disappointed" at the verdict.

"I am convinced my son was tortured," he said. "I believe they told him if he did not give them the answers they wanted they would give him an even worse time, and that he committed suicide because he couldn't take it any more."

Unionists and civil-rights campaigners denounced today's verdict as "one-sided" and a "whitewash."

Helen Suzman, the veteran civil-rights advocate in parliament, described it as "the most astonishing finding I could ever have imagined," and said she would raise it in parliament.

Neil Aggett was a 29-year-old doctor whose concern for the position of blacks under South Africa's segregationist policy, known as apartheid, caused him to take a job with the clothing workers' union and to do ward duty in a black hospital near Johannesburg. He was detained in a security police raid in November 1981.

Under South Africa's tough security laws, the security police may detain people indefinitely without charges, holding them incommunicado and in solitary confinement.

Aggett and more than 100 others picked up in the November raid were held like this through January, while Law and Order Minister Louis Le Grange made statements promising a security show trial with startling revelations.

The security investigation fizzled and one by one the unionists were released, some under banning orders. One was charged in court and acquitted.

Aggett was found hanging from the bars in his cell on the morning of Feb. 5. During the inquest Bizos claimed the security police became desperate to extract evidence for the show trial Le Grange had promised and resorted increasingly to brutal interrogation.

Ten of the detainees testified that they were tortured, showing what Bizos called "a pattern of ill-treatment." This turned the inquest into the most extensive investigation ever held into the methods used by the security police, who are normally protected from public scrutiny by the security laws.

The detainees said they were kept in solitary confinement for long periods, then, during interrogation, were slapped, hit and humiliated, made to stand for hours, sometimes days, and deprived of sleep.

Some said they were stripped naked and made to do violent exercises, others that they were given electric shocks and had their genitals crushed.

Aggett was said to have been subjected to particularly severe and prolonged mis-treatment. Police witnesses testified, however, that relations with the detainees were good. They said they were "amazed" when Aggett committed suicide.

Because the interrogations took place with only the police and a single detainee at a time present, there were no other witnesses, and it became a case of each single detainee's word against that of the police, who could call supporting witnesses from among themselves.

Kotze accepted the police version and rejected that of the detainees. He said the police testimony was given satisfactorily, while that of the detainees contained errors of detail and lacked substantiation.

Kotze also said the detainees were hostile to the police "and therefore the possibility of bias cannot be excluded."