An American-supplied helicopter with U.S. military and civilian officials aboard opened fire on a group of El Salvadoran peasants herding their cattle 10 days ago, State Dapartment sources said yesterday.

The incident took place Oct. 17 as the Americans were being flown from the Salvadoran capital to inspect the Lempa River bridge, which had been severely damaged by insurgent forces two days earlier. In the helicopter at the time, according to the sources, were two American majors from the U.S. Army Corps of Engineers, one of the 40 U.S. military trainers assigned to El Salvador, and an American civilian engineer employed by the Agency for International Development (AID).

A State Department spokesman said yesterday that Salvadoran military authorities have told the U.S. embassy that an investigational has been ordered, and that the helicopter pilot, a Salvadoran, will be punished if "improper conduct" is discovered. The pilot is under detention, the State Department said.

The spokesman said he had no information about whether any of the peasants were wounded or killed. The official said the Salvadoran pilot claimed that the helicopter had been fired on from the ground.

Officials said it was the first incident in which American military personnel have been involved in hostile action in El Salvador. The State Department said none of the Americans participated in the shooting or was responsible for it.

The Americans evidently reported the shooting to the embassy as soon as they returned to the capital from the mission, which continued after the incident. Official inquiries were quickly directed to the Salvadoran military. This, along with the detention of the helicopter pilot, indicated major questions about the motivation for the shooting.

The Lempa River bisects El Salvador, separating the capital of San Salvador and the heavily populated Western two-thirds of the country from the sparsely populated eastern portion. The bridge, which was severely damaged by insurgents, is among the most important spans across the river.

The presence of the U.S. military and civilian engineers on the inspection trip suggests the possibility of American aid to restore the traffic flow by repairing the bridge or deploying makeshift substitutes.

When insurgents began attacking power facilities in the Salvadoran countryside a little more than a month ago, U.S. officials reacted by supplying 50 to 60 portable generators to negate the damage.

The State Departent has refused repeatedly to comment officially on a report that Cuban troops recently flown to Nicaragua are responsible for the damage to the Lempa River bridge. Unofficially, officials have expressed doubt of a direct involvement by Cubans, who are believed to have flown to Nicaragua on a mission related directly to the political stakes and stability of the government there.