SAN SALVADOR, JAN. 26 -- A military appeals court today ordered three suspected participants in the 1985 slaying of 12 persons, including four U.S. marines, freed under El Salvador's sweeping amnesty law that was adopted to conform with a regional peace plan.

U.S. Embassy spokesman Jake Gillespie said the United States was "dismayed at the court's decision" and would withhold $18.5 million in economic aid because of the ruling.

"We do not believe persons who have committed crimes of terrorism, in this instance the massacre of unarmed innocent persons eating in a restaurant, should go unpunished," Gillespie said. "In our discussions with the Salvadoran government concerning those charged with the Pink Zone massacre, we have stated our belief that the release of these persons is morally wrong and politically damaging."

The killing, claimed by a leftist guerrilla group, took place in an area of restaurants and night spots known as the Pink Zone.

Attorney General Roberto Giron Flores, supported by the embassy, had appealed a November lower-court decision freeing the men. He said today's ruling was final.

"The court has ruled that the crime was purely political in nature, and therefore covered by the amnesty," Military Appeals Court Secretary Rene Samuel Valdivieso told a crowded news conference. "The three are ordered freed."

Valdivieso said the men, held in separate prisons, would be freed Friday or Saturday because of the paperwork involved in processing their release.

Under recently passed legislation, the U.S. Congress has said 10 percent of the $185 million in economic support funds for El Salvador must be withheld if the three are freed.

"This means that $18.5 million of the appropriated economic-support funds will not be available," Gillespie said. In a similar ruling by another court that freed the convicted killers of two American land-reform advisers, the United States said it was "appalled and outraged," and threatened to cut its $9 million judicial aid package to El Salvador.

In another prominent case involving Americans, the rape and murder of four U.S. churchwomen, a lower court ruled the five National Guardsmen convicted in the case were not eligible for amnesty, and they remain imprisoned.

El Salvador is one of the staunchest U.S. allies in Central America, and is slated to receive a total of more than $500 million in U.S. aid, economic and military, this year.

The Revolutionary Central American Workers' Party, a faction of the Marxist-led Farabundo Marti National Liberation Front, took responsibility for the June 19, 1985, killing.

In one of their most brazen attacks of the war, the rebels opened fire on two outdoor cafes, killing four off-duty marines, assigned to guard the embassy, along with two American computer technicians.

A Guatemalan, a Chilean and four Salvadoran civilians were also killed, and one guerrilla was killed in the cross fire. The United States offered a $100,000 reward for information leading to the arrest of the perpetrators.

The case was cracked by a U.S.-trained special investigative unit and no one collected the money. The military also hit back at the guerrilla group and, after attacking a large camp several weeks after the killing, said it believed it had killed some of those involved in the attack.

The attorney general and U.S. Embassy argued that the killing was "aggravated homicide," and therefore a common, not political crime. They also argued that international treaties regarding acts of terrorism superseded the amnesty, so the men should not be freed.

But the appeals court "determined the crime had a military objective, and was an act of terrorism," Valdivieso said. "Therefore the crime is covered by the amnesty."

President Jose Napoleon Duarte signed a sweeping amnesty covering all political crimes on Nov. 5 as part of his compliance with the Central American peace plan.

The amnesty has been criticized by human rights groups because it closes thousands of unsolved right-wing death-squad cases.

Duarte has defended his decision as necessary for the nation to begin a process of reconcilliation in the midst of the eight-year-old civil war. More than 60,000 people, mostly civilians, have died in the fighting and related political violence.

In August 1985, Duarte announced that William Rivas Bolano, Juan Garcia Melendez, and Jose Dimas Aguilar had participated in the Pink Zone killing and had been captured. They have never been tried although they have been imprisoned since their capture.

At a government press conference shortly after being captured, Rivas Bolano said he participated in the shooting and the others said they gave protection to those involved. All three later said they made the statements after being tortured and retracted them.