In a major setback for President Reagan, the Republican-controlled Senate Foreign Relations Committee yesterday decided to cut in half his request for an additional $60 million in immediate military aid to El Salvador.

The administration has said the aid is crucial to the U.S.-backed Salvadoran government in its battle against Marxist rebels. However, committee Chairman Charles H. Percy (R-Ill.) said the cutback to $30 million "does not restrict them all that much."

In a letter to Secretary of State George P. Shultz, the committee placed no conditions on the new aid, but it said American policy should be "to support the evolution of democratic forms of government" in El Salvador and to "encourage an unconditional dialogue among all parties to the conflict in the hopes of achieving a political solution."

It also called for "far-reaching reforms of the judiciary in El Salvador" and the prosecution of those responsible for the deaths of eight Americans there.

The letter advised the administration that the number of U.S. military trainers in El Salvador should be limited to 55, a number to which Reagan has agreed but does not want written into law.

Percy, who had favored the administration's full request, said the agreement was a compromise forged after intense negotiations with Sens. Nancy Landon Kassebaum (R-Kan.) and Christopher J. Dodd (D-Conn.), who had lined up a majority of the committee behind a proposal to cut aid to $23.7 million.

"This package makes no one happy," Percy said. "But it's made everyone equally unhappy . . . . It represents a consensus."

Sen. Claiborne Pell (D-R.I.), ranking minority member on the committee, called the letter "awfully weak" and said he opposed any new aid at all this year. But after adding a paragraph calling on the administration to comment on the recommendations, Pell agreed to sign it.

The Foreign Relations Committee action came a day after another Senate panel, the Appropriations subcommittee on foreign operations, agreed to the $60 million request on condition that the administration state in writing that it would limit the number of trainers to 55, encourage judicial reform and work with Central American countries toward an unconditional dialogue between the Salvadoran government and the rebels.

The administration's unusual request to divert $60 million to El Salvador from other nations' accounts is by tradition subject to approval by the House and Senate Appropriations subcommittees. This year, for the first time, the Senate Foreign Relations Committee asserted its authority over a reprogramming request, based on a 1981 agreement with the administration.

A State Department official who has followed the matter closely said after the Foreign Relations Committee action, "Legally, they don't have a leg to stand on, but as a practical matter, we will not ignore their input."

In a statement issued before the Foreign Relations Committee action yesterday, the administration seemed to apply a fairly loose construction to the conditions set forth in the Senate Appropriations subcommittee letter Wednesday.

State Department spokesman John Hughes said the administration would maintain the number of military trainers in El Salvador "at roughly 55" and would consult with Congress if it "intends to go significantly over that number."

The Appropriations subcommittee letter had simply stated that the president should reaffirm that the number of military trainers "will not exceed 55 persons."

The differences between the two Senate panels over the amount of aid and the strings attached could give the administration room to maneuver. But members of both committees said the administration is likely to be bound by the most restrictive conditions, and the lowest amount of aid.

The number of trainers is an especially sensitive question because it is related to the amount of aid ultimately approved. The administration maintains that it could train more soldiers less expensively with more U.S. trainers in El Salvador, rather than bringing Salvadorans to the United States.

But the Foreign Relations Committee letter said "any additional training to be provided by these or other funds for the Salvadoran military in FY 1983 should be limited strictly to training at facilities in the United States."

A House Appropriations subcommittee also is considering the aid request but has postponed action until after the Easter recess.

Chairman Clarence D. Long (D-Md.) said in an interview yesterday that the Democratic-controlled panel is going to be "harder-nosed" than the Senate committees. He said his subcommittee would be unlikely to approve more than $30 million, and "quite possibly" less.

Whatever funds it allows, he said, will be conditioned on progress toward negotiations between the Salvadoran government and the rebels, and steps to improve the human rights situation.