U.S. economic and military aid plans being considered for El Salvador's beleaguered government do not include the involvement of American forces "in so-called 'counterinsurgency' programs," the State Department said yesterday.

The suggestion that U.S. military advisers would be involved in counterinsurgency training in the Central American country "is incorrect," a department statement said. "We wish to be responsive . . . to the needs" of the Salvadoran government, it said, and are considering "a limited amount of military training and equipment."

The statement came in response to a report yesterday that some State officials believed a plan calling for dispatch of U.S. military advisers to El Salvador would involve the United States in counterinsurgency efforts against the Salvadoran left and escalate U.S. involvement there.

Meanwhile, in El Salvador, leftist militants ended a two-day occupation of the Panamanian Embassy peacefully, freeing Ambassador David Peret Ramos and two other hostages unharmed. Peret called the occupation "a form of dialogue" and the militants said he agreed to carry their demands to the government.

A high-level official in El Salvador's ruling junta reached there by telephone said growing division between civilian and military members of the coalition government had reached a "grave crisis."

Young military officers last October overthrew a rightist government and formed a junta with left-center politicians with pledges of economic, political and social reform. In early January, the civilian members of the junta resigned, charging that the military would not permit the promised reforms to be implemented.

Although the junta was reconstituted with members of the centrist Christian Democratic Party, and the reform promises were renewed, divisions between the armed forces and civilians in the government have continued.

On Tuesday, five persons were killed when military police stormed Christian Democratic headquarters, which had been occupied by leftist militants demanding the release of jailed colleagues.

Civilian sources within the government said the assault on the party headquarters went against junta orders to the police. They said the party had been negotiating with the leftists, who had agreed to leave the building Wednesday and release hostages held inside.

The sources said it remained unclear who had given the police the order to attack, but that those civilians killed had been shot while attempting to leave the building with their hands up.

"Things are very tense," one high-level Christian Democrat in the government said. "The government is in a very serious crisis."

Disputes between civilians and the military have centered on how to deal with increasing violence from leftist groups who believe the promised reforms are too little and too late, and from growing terrorist organizations on the right that oppose the reforms.

While the military has indicated its interest in receiving U.S. military assistance to help combat the terrorist threat, junta civilians have resisted the aid for fear the left they seek too woo would brand them "U.S. puppets." t

The Popular Leagues of Feb. 28, whose members pulled out of the Pamamanian Embassy, continued its 10-day-old occupation of the Spanish Embassy, news services reported from San Salvador.

A larger leftist grouping, the Popular Revolutionary Bloc, held the city offices of the water and sewer administration to press demands for better service to poor areas.