Leftist guerrilla forces, in the face of a deteriorating military position, have sharply increased attacks on civilian authorities in small towns and villages of eastern El Salvador, the government said today.

The Salvadoran Army reported that nine mayors have been kidnaped by insurgents since the beginning of the year. Of those, two were later found dead and another was released, an Army spokesman said. Also, since June, the Army calculated, 32 town halls have been sacked or burned by guerrillas, mostly in rural areas of longstanding guerrilla strength in the eastern provinces of La Union, San Miguel, Morazan and Usulutan.

Guerrillas of the Farabundo Marti National Liberation Front, the rebel umbrella organization, frequently have taken over small town halls and destroyed government installations or records in their five-year-old war to take power in El Salvador. But the Salvadoran Army and diplomatic sources described the capture and killing of mayors as a departure for the movement, which traditionally has sought to gain the broadest possible support among the populace.

Maj. Carlos Aviles, the Army spokesman, said the recent attacks against mayors reflect inability by the guerrillas to confront the Army directly. His comments fit a pattern of increased confidence by the Salvadoran Army and its U.S. advisers that leftist guerrilla forces have been doing poorly on the battlefield for the past year. The defense minister, Gen. Carlos Eugenio Vides Casanova, said Tuesday that the armed forces, strengthened by large doses of U.S. aid, are now heading "irreversibly" for victory in the civil war.

Aviles and other Salvadoran sources speculated that the recent guerrilla attacks on mayors may also be aimed at preventing consolidation of civilian authority at the village level under the administration of President Jose Napoleon Duarte. Duarte, a U.S.-backed Christian Democrat, was elected a year ago, becoming the country's first popularly chosen civilian president in 50 years. His party won a majority in the National Assembly in legislative elections March 31, along with control of about two-thirds of the 260 town halls.

The victims in the attacks reported today were affiliated with both of the country's main political parties, Duarte's Christian Democrats and the right-wing Nationalist Republican Alliance.

An official of the guerrillas' political wing, the Revolutionary Democratic Front, said last week that rebel forces have in recent months sought to increase the number of people doing political work among the Salvadoran populace.