SAN SALVADOR, DEC. 30 -- The United States, reacting angrily to the freeing of the convicted killers of two American land reform advisers and the Salvadoran head of the land redistribution program, threatened today to scale back aid to the Salvadoran judiciary.

"We are appalled and outraged at the court's rejecting the government's appeal of the amnesty granted in this case, which was not in our view a political crime," a U.S. Embassy spokesman said in a prepared statement. "The Sheraton case was tried as a common crime and the killers convicted under purely criminal statutes.

"The same view regarding the Sheraton case was expressed to us before passage of the amnesty law by senior Salvadoran judicial and executive officials," the spokesman added.

The ruling also closed the case against Eduardo Avila, a cashiered captain widely believed to have ordered the killings that took place in the coffee shop of the Sheraton Hotel in the capital. Two former National Guardsmen convicted of the Jan. 3, 1981, killings of Americans Michael Hammer of Potomac, Md., and Mark Pearlman of Seattle, along with Jose Rodolfo Viera, were freed Dec. 19 by an appellate court.

Pearlman and Hammer were advisers with the American Institute for Free Labor Development, affiliated with the AFL-CIO. Viera was head of the nation's controversial land reform program.

The amnesty was part of a regional peace plan, and pardoned all political crimes. A lower court ruled the killings were political, not common, and ordered the men's freedom. In a separate case last month, a military judge ordered that the amnesty applied to the three confessed killers of four U.S. Marines and two other Americans in an attack on an outdoor cafe in 1983.

In the land reform killings, the attorney general, backed by the United States, appealed the ruling, but the appeal was rejected and the men freed.

"Given the situation, we plan to review the level and types of assistance we are providing to the Salvadoran judiciary," the statement said. The spokesman refused to say how much of a cut was being considered.

El Salvador is one of the staunchest U.S. allies in Central America and in fiscal 1987 received $608 million in economic and military aid, making the Massachusetts-sized country one of the leading recipients of American aid in the world.

Of the total, about $9 million went to four judicial reform projects, viewed by the U.S. Embassy as essential for strengthening the country's fragile democratic process.

The program includes a unit to protect witnesses and judges involved in controversial cases; an advisory commission to recommend changes in the nation's archaic judicial system; a commission for criminal investigations, and judicial training. In 1987, about 200 Salvadoran judges went to the United States for training.

The surprise ruling and the freeing of Jose Dimas Valle Acevedo and Santiago Gomez Gonzalez came just hours before the courts went on a three-week recess, another aspect that the embassy questioned. Court sources said the ruling was executed so it would receive little publicity in the United States.

The U.S. Embassy, which monitored the case closely since it began, says it did not learn of the freeing until a report surfaced in the local press this week.

Col. Reynaldo Lopez Nuila, undersecretary for public security, who is in charge of much of the judicial reform work, said he did not agree with the court's decision to grant amnesty, but said cutting off the aid would mean the end of the programs.

"We would all suffer the impact of the cutoff," said Lopez Nuila, who leaves his job Jan. 1. "With our economic situation the way it is, we would not be able to maintain the programs."