Guerrillas attacked a communications installation atop a volcano overlooking this capital before dawn this morning, killing seven National Guardsmen who were defending it and damaging two television antennas, the armed forces said.

The 53 National Guardsmen assigned to the installation, aided by machine-gun fire from an AC47 airplane and a helicopter, drove off the guerrillas in four hours of fighting, according to Army officers and residents living on the slopes of the San Salvador Volcano six miles from the center of the city.

The raid was the largest guerrilla attack this close to the capital in more than two years.

The Popular Liberation Forces, one of the two largest left-wing combat groups, claimed in an evening broadcast that it left 60 guardsmen dead or wounded. Television crews filmed the removal of seven dead soldiers from the peak.

The guerrillas, who are part of the Farabundo Marti National Liberation Front, temporarily overran one end of the fenced-in cluster of buildings and towers, firing 90-mm cannons, 81-mm mortars and machine guns, according to two reporters who visited the center late in the afternoon and attributed the information to the officer commanding the defenders.

But the guerrillas failed to overrun the target, and the armed forces praised the National Guardsmen's "heroic" defense. The United States had delivered the AC47 gunship in December despite some concern in the U.S. Congress that its capacity to blanket the ground with fire would increase civilian casualties.

But according to more than 25 residents interviewed today only one civilian was wounded from gunfire from the air. He apparently was hit by a bullet from the helicopter.

The AC47 "was used, and with much effectiveness," armed forces chief of staff Gen. Adolfo Blandon said. He said a woman was killed at the installation, apparently a victim of the guerrillas' attack.

Blandon said at a news conference that the attack began at 12:40 a.m. and that four guardsmen were wounded and two were missing. Blandon said figures on guerrilla casualties were not available, but that the defending guardsmen's commander believed 400 guerrillas were involved.

The armed forces dispatched 2,500 troops from the two closest brigade headquarters to surround the guerrillas and hunt them as they withdrew, Blandon said. But soldiers interviewed on the slopes this afternoon said that they arrived there only after dawn, about five hours after the attack, and had had no contact with the guerrillas.

The guerrillas damaged television antenna towers for two channels, as well as blowing up a building housing telephone equipment. Telephone service was normal, however, this afternoon.

The installation is on El Picacho, the higher of two peaks on the extinct San Salvador Volcano.

About halfway down El Picacho, its slopes become less steep and are covered with coffee farms and scattered small houses. The residents said they almost never saw guerrillas in the neighborhood.

"It never has happened like this," Felicita Juarez, 40, said at her neat brick home in the hamlet of El Progreso. She and the rest of her family of five crawled under their two beds when the "explosions" began.

About half an hour later, she said, they were joined in the house by seven members of the Perez family, who live farther up the volcano. Santos Perez, was struck in the forehead while sitting in the Juarez house when a bullet splintered a wooden beam, members of the Juarez family said.

They said that they heard the helicopter's rotors nearby.