Gunmen shot and killed the Salvadoran armed forces' chief spokesman here today in an action that appeared to be part of a recent increase in left-wing guerrilla attacks in the capital.

The gunmen shot Lt. Col. Ricardo Cienfuegos, director of the Armed Forces Press Committee, on a tennis court at a sports club at about midday. They draped a red banner over his body, marked with large yellow letters reading "FPL." Those are the Spanish initials of the Popular Liberation Forces, one of the two largest factions in the left-wing guerrilla alliance called the Farabundo Marti National Liberation Front.

Although the FPL flag pointed to the guerrillas as the killers, so far there have been no other public claims by any group.

Cienfuegos was the first prominent victim to die in the capital in an apparent attack by left-wing guerrillas since a U.S. military adviser was gunned down in May 1983. Salvadoran and U.S. officials have said recently that the guerrillas were moving some of their combatants into San Salvador because of their lack of success in the countryside in the past year.

"The left has adopted a policy of urban destabilization," President Jose Napoleon Duarte said moments after learning of Cienfuegos' murder. He cited both a recent spate of political killings by the left and a series of strikes by government employes' unions sympathetic to the left.

Duarte was meeting with a small group of U.S. reporters at the presidential palace when he was notified of the killing at 1:05 p.m. He immediately called Defense Minister Carlos Vides Casanova, who provided him with details.

"It's almost impossible to prevent surprise assassinations of this kind," the president said.

A ball boy who was working on a tennis court near Cienfuegos when the officer was killed said that he heard two shots and then saw three persons dressed in tennis attire running away from the scene of the murder. Cienfuegos was shot while he was sitting on a bench next to a tennis court, the ball boy said, and the body still was seated on the bench and draped with the flag when reporters arrived about an hour later.

Cienfuegos, who was well known to reporters because of his work as spokesman, played tennis regularly at the club at midday. A policeman guarding the club after the shooting said that private security guards normally provide protection there.

El Salvador's left-wing guerrillas were active in the capital in the late 1970s and in 1980, but they shut down most of their operations beginning in 1981 because of stepped-up countermeasures, including killings of numerous suspected leftist sympathizers. Until late last year, the Farabundo Marti front concentrated almost all of its fighting in the countryside north of the capital and in the eastern part of the country.

In recent months, however, both government officials and guerrilla leaders have said that the left was seeking to rebuild its urban base. This appeared to be a reaction to the Army's improved performance in the countryside, where the government has had the military initiative for more than a year.

The guerrillas' clandestine Radio Venceremos reported Saturday, for example, that "urban guerrilla commandos" had killed six persons in the previous five days. The victims included a factory personnel manager identified as an "enemy of the working class," an Army captain, three military security force personnel and an Air Force enlisted man, the broadcast said.

"We are everywhere, striking blows everywhere," Radio Venceremos declared.

The three security force personnel mentioned by the broadcast were killed when the guerrillas fired a rocket-propelled grenade at a truck carrying 40 national policemen, according to press reports.

Gen. Paul Gorman, outgoing commander of U.S. military forces in Latin America, said in congressional testimony last week that the Salvadoran guerrillas had increased their combatants in the capital to 500 from 50 in the past six months. He said that Washington had intelligence reports indicating that the rebels planned to move back into the cities.

The pickup in urban attacks led U.S. military trainers here to begin about two months ago to train Salvadoran military personnel to confront urban guerrillas, military sources said. The Salvadorans are receiving special training to handle incidents in which hostages are taken, for example, the sources said.