Leftist guerrillas and government troops were locked in new fighting yesterday in central El Salvador and the guerrillas held their ground on two northern fronts despite massive counterattacks from the air and ground.

The new fighting, coinciding with the third anniversary of the military coup that marks the start of the civil war, broke out near Santa Clara, 40 miles east of the capital. A civil defense commander in the nearby town of San Esteban Catarina said there was heavy fighting after rebels ambushed Army troops. There were no immediate reports of casualties.

At dusk in San Salvador, the guerrillas stopped traffic at the north-side working class district of Ayutuxtepeque and ambushed military vehicles. It was the first action in the capital in six months. Rebels armed with submachine guns and grenade launchers engaged civil defense and police units in a 40-minute firefight but were driven off.

In Chalatenango province in northern El Salvador, the commander of a 5,000-troop counterattack claimed 62 to 65 guerrillas were killed in fighting at the town of Las Vueltas. The commander, Maj. Armando Aviles, said his troops "continued advancing" in the area, 50 miles north of the capital. He said two soldiers were killed and four wounded.

Official sources said government casualties were 22 dead and 32 wounded since the operation started Tuesday.