The leftist guerrillas stormed in here under the cover of darkness before dawn, taking sporadic gunfire from Army and National Guard defenders before pulling back into the piney hillsides at midafternoon.

Their nine-hour stay on Dec. 22, one of countless such assaults, did little to change the course of El Salvador's three-year-old civil war. In all likelihood, it will not alter the U.S. role in advising and financing the Salvadoran Army's fight against the rebels. But the story surrounding it goes a long way to describe how the conflict is waged, and by whom.

The way Mayor Guadalupe Sola and his villagers tell it, the problem began toward the end of November. That is when Maj. Luis Alonso Alvarado was put in charge of La Palma's paramilitary civil defense force.

Alvarado had trouble almost from the beginning. He backed the Arena party headed by the Salvadoran right's extremist leader, former Army major Roberto d'Aubuisson, while Sola and his friends in La Palma back the more moderate Christian Democratic Party. There were charges and countercharges of political misconduct, using public office to gather political support.

Then on Dec. 12, according to Sola and several villagers, Alvarado shot and killed a young farm boy who with a companion had been drinking and causing trouble in the village one night. Word soon reached La Palma that guerrillas of the Farabundo Marti National Liberation Front planned to avenge the death.

So when the rebels moved in on Dec. 22, they headed straight for Maj. Alvarado's house, killing him and two of his men who tried to put up a fight. As some guerrillas bought bread and sweets, others robbed the local government health center of its medicines and still others clashed with a National Guard contingent just off the town square. None of the guardsmen was killed or wounded, but Sola said an old woman trying to get some tranquilizers was killed in crossfire, along with a young boy who dashed into the street at the wrong time.

A civilian villager also was found dead after the fighting, Sola said, but no one is sure how he was shot.

The Army garrison at El Paraiso about 20 miles down the mountainside, meanwhile, had dispatched a 60-man squad to help. A guerrilla ambush caught the troops as they drove up into the hills, however, killing eight and wounding four, according to a soldier from the same company.

Responding, the Army sent two helicopters mounted with machine guns and an A37 Dragonfly warplane to seek out the guerrillas. An officer at El Paraiso garrison said the Dragonfly bombed rebel positions, but the Army relief unit nevertheless pulled back, leaving the bodies of its dead behind.

The next day, a full Army company, swelled by about 50 National Guard troops, moved slowly back up the road, looking for the bodies of those killed the day before. As a helicopter thumped overhead, four were found lying in the ditch, their uniforms and weapons stripped away.

Also found beside the road were the bodies of two civilian men. They had been shot in the head and body--by whom was unclear.

The youthful soldiers, some carrying recoilless rifles and mortar tubes in the winter sun, sweated profusely as they walked slowly and gingerly up the hill. At one point, they took a break in the shade of a cliff as their officer radioed back for a vehicle to pick up the bodies.

The officer, sharp and with a thick red mustache, was Lt. Rodolfo Lopez Sibrian, who according to the testimony of two National Guard officers ordered the assassination of two American land reform reform advisers on Jan. 3, 1981, along with the head of the reform program as they dined in the Sheraton Hotel in San Salvador.

Arrested in the murder, Lopez Sibrian was released last October by a judge. This upset the U.S. Embassy because the Reagan administration must certify this month that El Salvador is making progress in human rights, and the case of the advisers' murder is being followed in Congress as a measure of justice here.

Defense Minister Jose Guillermo Garcia, meanwhile, has assigned Lopez Sibrian to active duty at the El Paraiso garrison, from where he was sent to command the lead unit heading up the road to La Palma