Behind the remote-controlled sliding steel doors at the entrance to Pretoria's central prison, Solomon Mahlangu and other condemned men wait their turn at the gallows.

Since South Africa had the highest capital punishment record the Western world last year, executing 132 persons, 105 of whom were black, the scheduled handging of Mahlangu for the murder of two whites in June 1977 would not appear unusual -- except that Mahlangu did not kill the two men.

His execution is certain to make him a martyr to the cause of black emenicpation in South Africa. "He's a hero to us," said a young black accountant.

The fulfillment of Mahlangu's death sentence would also set an unfortunate legal precedent in South Africa, some legal authorities say.

Sources involved with the case charge there has been a miscarriage of justice and compare their sentiments to those felt by opponents of the executions of Julius and Ethel Rosenberg. Through diplomatic channels, the Soviet, British and French governments have encouraged South Africa to spare Mahlangu's life, well informed sources said.

Mahlangu, 22 who used to sell apples on trains to help support his impoverished and fatherless siblings, is on Pretoria prison's equivalent of Death Row for reasons that are rooted in the student revolt in black communities during 1976 and 1977.

Like thousands of other high school students Mahlangu left South Africa for "military training" during the upheavals, recruited by a member of the banned black nationalist novement, the African National Congress. Mahlangu was one of the few who returned -- as a freedom fighter or terrorist depending on your point of view -- to make a political statement through violence.

According to evidence at his trial, Mahlangu was sent from Mozambique to Luanda, ANGOLA, WHERE HE UNDERWENT INTENSE POLITICAL INDOCTRINATION BY THE Congress and was at times treated harshly and occasionally kept in isolation.

He was trained in weaponry and sabotage techniques, but according to Mahlangu's testimony, he was taught to spare shuman life in all his sabotage activities against transport lines and fuel facilities. The guns he was eventually given were for self-defense against the police and for hitting oil tankers, he said.

With two other young, men, named "Luck," and Monday Motloaung, Mahlangu returned clandestinely to South Africa through Swaziland on June 11, 1977. The three arrived in Johannesburg two days later toting shopping bags holding bombs, detonators and Scorpion automatic pistols. The equipment was hidden in toothpaste turbes, boxes of detergent, kleenex and cocoa.

As they entered a taxi to go to the black township of Soweto to store their weapons, they were approached by a plainclothes policeman who wanted to inspect their bags. Panicking, they ran.

Motloaung and Mahlangu were chased by members of the public. They took out their guns and loaded them to frighten their pursuers, Mahlangu said at his trial. He said he ran into a department store warehouse, past four white men drinking their morning tea and climbed over a wall at the back of the building.

His partner followed him into the warehouse and opened fire on the four men, killing two. Believing Motloaung to be in trouble, Mahlangu returned to the warehouse and both were captured.

Motloaung is now in a mental institution unfit to stand trial as a result of blows to his head with his gun by civilians who subdued him before the police arrived.

Lucky escaped. (Over a year later he appeared on a CBS TV documentary by Bill Moyers and George Crile, taking credit, wrongly, for the killing of the whites.)

Mahlungu was charged with murder under a South African legal concept holding an accomplice to a crime equally guilty of the act if it is proven he conspired or planned the crime.

Mahlangu's lawyer, Clifford Mailer, presented evidence demonstrating that the killings were not planned but were rather a spontanous consequence of Motloaung's panic. Nevertheless, Supreme Court Judge Charles Theron known among blacks as the "hanging judge" for the large numbers he sends to the gallows, found Mahlangu equally guilty by "common purpose," even though he had not fired a shot.

Since the ruling National Party came to power 30 years ago, executions for politically motivated crimes have been rare. No date has been set for Mahlangu's execution and his lawyer is presently preparing a clemency petition.

South African whites accused of murder are often treated more leniently than blacks like Mahlangu. For example, last year a white farmer who shot a black woman in the back was given a one-year jail term and two white policemen who beat to death a black prisoner received 12 years imprisonment each.