Leftist rebels attacked army positions at a sugar refinery and a bridge, killing six soldiers and bringing to ten the armed forces death toll in two days of guerrilla operations.

Meanwhile, Treasury Police commandos on Wednesday night stormed a prison where inmates had held three hostages for 45 hours. Authorities said three prisoners and a hostage were killed in the raid.The guerrilla raids Wednesday followed by hours a rebel mortar attack on national guard headquarters in San Salvador that left four dead and 37 wounded.

Rebels attacked a sugar refinery nine miles north of the capital before dawn Wednesday, said the head of plant security, who identified himself only as Sgt. Sandoval.

"They attacked us with mortars and rifle fire, but they didn't destroy the machinery. They damaged the offices, and they killed four soldiers and wounded four others," he said.

About the same time, rebels killed two national guardsmen in a 30-minute attack on a post at a nearby highway bridge, military sources said.

In Washington, State Department spokesman Charles Redman said the guerrillas were mounting a coincident diplomatic effort in the region "to portray themselves as somehow more moderate in their stance and more powerful than they really are."

Redman said the attacks did not alter plans by Secretary of State George P. Shultz to attend a foreign ministers meeting of the Organization of American States in San Salvador in mid-November.

Four soldiers were killed and 37 people, including seven civilians, were wounded in the national guard attack Tuesday, the largest rebel strike in the capital since January 1981.

The national guard is part of El Salvador's armed forces and participates in counterinsurgency operations.

About 65,000 people have been killed in the 9-year-old war, the majority of them civilians.

The prison assault ended a standoff that began when three inmates jumped two guards and took their rifles at the prison in Quezaltepeque.

The assailants, along with three other inmates, demanded political asylum in Mexico in exchange for releasing the hostages, a nurse and two prison guards.

Communications Minister Roberto Viera told reporters that about 100 prisoners not involved in the hostage-taking had tried to flee the prison, which was surrounded by troops.

The attempted escape provoked the six hostage-takers, who threw a grenade and began shooting at the troops and fleeing prisoners, Viera said.