A communique purportedly signed by a unit of El Salvador's main left-wing guerrilla front asserted today that it staged the restaurant attack that killed four U.S. marines and nine civilians, including two Americans, Wednesday evening. The front's main clandestine radio pledged that killings of U.S. personnel would continue.

The two-page communique, carrying the initials FMLN of the Farabundo Marti National Liberation Front, claimed the killings of the marines but sought to blame "armed elements dressed as civilians" for the killings of the civilians. It provided only a vague description of these "elements" and did not give a specific account of what happened.

Witnesses made clear that most of the deaths came at the hands of the attackers. But the possibility existed of cross fire, perhaps from bodyguards, that could have contributed to the toll. U.S. officials said investigations had yet to produce a comprehensive account of what happened.

"Our commandos assume responsibility for execution of the political-military operation called: Yankee Aggressor in El Salvador, Another Vietnam Awaits You," began the rebel communique, which was supplied to Salvadoran radio stations. About halfway through it said: "We deeply regret that, because of the inferior technical combat capacity of these elements of the Army dressed as civilians, our people have had to pay such an elevated social cost."

The violent left appeared to have made a tactical decision to carry out attacks on U.S. government employes as part of a general expansion of its activities in the capital, and increasing attacks on civilians nationwide, Salvadoran and U.S. political observers said.

U.S. Embassy officials said they were convinced that the marines were the principal target of Wednesday's attack, as is generally accepted by witnesses, Salvadoran officials and journalists who covered the incident. The marines were the first of the 200 U.S. citizens employed by the embassy to be killed since May 1983.

The civilian deaths, in particular, appeared to have cost the left a major public relations defeat on the influential issue of human rights here, according to the political observers and brief interviews with Salvadorans on the streets. One of the left's main allegations against the government has been that it sanctioned brutal right-wing repression, particularly in the early part of the five-year-old civil war.

"This was a massacre, which doesn't help the boys," a 28-year-old waiter said, using the slang term for the guerrillas.

Some witnesses and investigators have said there apparently was a shootout during the 10-minute assault on a short block of outdoor cafes in this capital's most chic nightlife area. Other witnesses did not report an exchange of fire, however, and fresh indications arose that the killers deliberately sought to murder light-skinned persons.

Both of the two U.S. civilians murdered, and their three Salvadoran and Chilean dinner companions, had fairer than average complexions, according to employes of the computer companies where the five worked.

The FMLN's Radio Venceremos, based in northeastern Morazan province, praised the killings of the marines but did not discuss either responsibility for the shootings or the civilian deaths. "Let this be clear: as long as there is more Yankee intervention, more U.S. marines will die," said the radio, which is under control of the FMLN's largest hard-line force.

President Jose Napoleon Duarte called attention to the human rights issue at the departure of the marines' bodies this morning on the runway of Ilopango military airport on the capital's eastern outskirts.

Duarte referred to Guillermo Ungo, president of the civilian political front that is allied with the FMLN, who has complained that Duarte was dragging his feet in seemingly stalled peace negotiations: "Once more I call on Mr. Ungo, who has been talking about dialogue. Now is the time to say something about this murder."

Ungo, who lives in exile in Panama City, was a political ally of Duarte before shifting to the rebel front. He is traveling in Europe, family members said.

Duarte stood beside the four caskets, draped with U.S. flags, in front of the U.S. Air Force C140 plane that took them to Panama. They are scheduled to be flown to Andrews Air Force Base Saturday.

Representing the U.S. government at the somber sendoff were Marine Brig. Gen. O.K. Steele, U.S. Assistant Secretary of State for Administration and Security Robert Lamb, and Deputy Assistant Secretary of State for Latin American Affairs Richard Halwell.

The communique appeared on letterhead marked with the initials PRTC of, in Spanish, the Central American Revolutionary Workers' Party. The party, one of the smaller of the FMLN's five guerrilla forces, has claimed attacks on a National Police truck and on the National Police barracks, as well as an occupation of six radio stations earlier this year.

The party is the most internationally oriented group in the FMLN. It planted bombs in downtown Guatemala City in 1981 and has staged attacks in Honduras. Its leader is Roberto Roca, who is one of the five top commanders in the FMLN's senior command.

"If this communique is what it is purported to be, the substance of the communique, with its pathetic attempt to excuse the massacre of innocent people, is unworthy of comment. The PRTC stands revealed for just what it is: thugs with rifles," said a U.S. Embassy spokesman.

The PRTC communique said that the attack was aimed not only at the marines but at unidentified "CIA agents and elements of other nationalities linked with intelligence organs at the service of U.S. imperialism." Observers suggested, however, that this may have constituted part of a propaganda effort to justify the civilian killings.