Harassed and embarrassed by demands from the United States for action in solving the assassinations of six U.S. citizens here in the past five months, Salvadoran officials, from the president to his powerful military chiefs, never tire of insisting that justice will be done.

The government, officials keep saying, will not shrink from prosecuting the guilty once the evidence is in, even if, as is widely suspected, the guilty turn out to be members of the military or related to the country's still powerful oligarchy.

"We are doing our best," President Jose Napoleon Duarte promised in one of his increasingly rare meetings with foreign reporters."I can assure you that as soon as we have sufficient evidence against anyone, no matter who they are, we will prosecute them in accordance with the judicial system of El Salvador."

It is precisely that reference to the country's judicial system that has reinforced skepticism about the government's ultimate willingness, or ability, to bring the murderers to justice even if its glacially slow investigations into the killings bear fruit.

During 46 years of military governments, there was little pretense of justice in political matters. But for the past 18 months of conflict and death under the new civilian-military junta. El Salvador's antiquated Hispanic system of justice has been paralyzed with fear.

"Ask anyone here how many people have been tried and convicted for any political crime -- murder, kidnaping, arson, bank robbery," said a senior diplomat here. "You will find the number is zero because no judge here has the courage to try anyone, be he left, right or center. They know that if they do, they will be killed."

That assessment is readily confirmed by those members of the legal profession who are still willing to discuss such matters with reporters.

"Justice here simply does not function any more," said one prominent lawyer who insisted that his name not be used. "Since the violence began, there is no example of the judiciary system functioning except in occasional cases of petty, not political, crime such as larceny and pickpocketing."

The fear that has become the dominant characteristic of Salvadoran society affects judges, prosecutors, court clerks and investigators alike. None wants to be marked as a target by the death squads that rule the country by night.

Although no one is sure of the numbers, lawyers in this violence-torn capital say that hundreds of the more than 600 who once practiced here have fled into exile or, in dozens of cases, have been killed or kidnaped for suspected political allegiances.

The difficulties facing the judicial system were demonstrated recently when the government -- clearly pushed by U.S. impatience -- finally initiated legal proceedings against two prominent Salvadoran rightists implicated in the slaying of El Salvador's land-reform chief and two AFL-CIO advisers to the program, Michael Hammer, 42, of Potomac, and Mark Pearlman, 26, of Seattle.

A waitress in the Sheraton Hotel Jan. 3 at the time of the killing has testified that she recognized Ricardo Sol Meza, a part owner of the hotel, and his brother-in-law, Hans Christ, at the scene.

The waitress, who has been taken out of the country for protection, said the two had signaled two other men, pointing out the three eventually slain, minutes before the two unidentified men pulled out their guns and began firing. m

Although the identification was reported to government investigators shortly after the killing, it took them until April 5 to order the arrest of Sol Meza, a portly playboy who belongs to two of El Salvador's oldest and wealthiest families. The arrest sent Hans Christ fleeing to Miami, where he was arrested by the FBI April 10 on a request from the Salvadoran government.

It took another three weeks for the government to find a judge who would hold a preliminary arraignment hearing for Sol Meza and set the legal wheels in motion for the extradition of Christ.

Unable to find a judge in the capitol to take on the case, the government finally had to promote one from the provinces. The judge, Hector Enrique Jimenez, was investigating the still unsolved Dec. 2 murders of three American nuns, Maura Clarke, Ita Ford, and Dorothy Kazel, and a lay worker, Jean Donovan, also from the United States.

Appointment of a new judge in the nuns' case still has not been made.

In an act that many considered courageous, Judge Jimenez, after taking depositions from the state prosecutor, Sol Meza and his lawyers, ordered Sol Meza held "indefinitely" on charges of conspiracy to murder. Such is the nature of the system of justice here that the judge then sent the case back into the state prosecutor's office to determine whether or not there was sufficient evidence against Sol Meza to order a trial and whether to extradite Christ.

Salvadoran lawyers well acquainted with the ways of their court, even in the best of times, say that is as far as the case is likely to go because under Salvadoran law two witnesses are needed to establish guilt. The prosecution apparently has only the waitress while the defense has already produced two witnesses to depict Sol Meza's presence and actions at the murder scene in an innocent light.

These lawyers, who also refuse to be identified, say that given precedents here, Sol Meza can be expected to languish in jail for awhile, then be released if no other witnesses come forward to accuse him. "That is the way it works here," said one with a shake of the head.

The state prosecutor general, Arturo Argumedo, who works in a windowless office with electrically locked steel doors and a .375 Magnum in his desk drawer, does not dispute the possibility, insisting that his hands are tied by not having any investigative power whatsoever. He says he can only act on information that the judge requests of those who do have investigative power -- the police and the military.

Because in the past the police and military authorities have tended to support the political right here, few expect them to show any great energy in trying to put the finger on Sol Meza, Christ and their alleged accomplices.

That is even more true in the still pending case of the murdered American women.What evidence exists from investigators, carried out with the help of FBI agents sent here at the request of the government, has pointed toward members of the armed force's own National Guard; which was manning a roadblock near San Salvador's airport through which the women would have had to pass before they disappeared.

An FBI report evaluating the evidence collected in the case has been sent to the special four-man government commission charged with the investigation. According to the FBI, its report failed to establish conclusively the identities of the murderers. But U.S.diplomats here have been quietly pressuring the government to act decisively on the evidence that the FBI did present or endanger the economic and military aid provided by the Reagan administration.

Prosecutor General Argumedo smilingly shrugs off the problems of law enforcement as being the unfortunate results of "the violence," which in 18 months has resulted in an estimated 16,000 deaths.

"The biggest problem we have . . . is the internal situation in the country that makes any investigation with any certainty difficult, if not impossible," Argumedo said. "Experience has show us that one of the left sometimes kills another of the left to blame it on the right and one of the right likewise will kill another of the right to blame on the left. Then there are the outright cases of the leftist killing the rightist, the rightist killing the leftist, and others killing just to settle personal grudges. All this rather complicates our administration of justice."