For the first time since elections here more than a year ago, American and Salvadoran officials say the U.S.-backed government has the initiative in its fight against leftist guerrillas.

They point to gains on the political and diplomatic fronts of this complex war as well as on the battlefield. But they caution that these may be difficult to sustain.

The defense minister, Gen. Carlos Eugenio Vides Casanova, said Friday during a visit to the town of San Ildefonso--until three weeks ago in the heart of guerrilla-controlled territory--"I am sure we have the initiative." But he was careful to add, "for the moment."

Outgoing U.S. Ambassador Deane Hinton told reporters in the capital that the Salvadoran armed forces are "chasing the rebels all around this damn country."

"Right now the Army's got it all their way, and it's damned encouraging," Hinton said. But, he noted, "four months ago the guerrillas had it all their way. They were going like a house afire. So military situations can change, and maintaining the momentum is an important problem."

In a struggle for power often founded more on public perceptions than on territorial gains or military victories, success rarely can be measured in clear, objective terms.

"There are always more imponderables and questions than there are answers," Hinton said.

The current optimism is based on several recent developments.

Politically and diplomatically "we were not so aggressive before," Vides Casanova explained as he walked through the muddy back streets of San Ildefonso toward a waiting helicopter.

Now, he said, "Our main offensive in the political area is carrying out free elections, also with the offer to have a dialogue with the left to participate in the elections, with the amnesty law, with certain reforms that are being introduced, with the elaboration of our constitution."

Even some members of the guerrilla movement have conceded in recent interviews outside the country that they have failed to come up with an adequate response to some of these moves by the government.

One rebel spokesman based in Mexico said last week that U.S. special envoy Richard Stone's highly publicized effort to meet the guerrillas' calls for dialogue, while representing little substantive change, "has been setting the diplomatic rhythm."

Other moderate members of the guerrilla movement have said in the past two months that they are concerned about their front's lack of a new response to upcoming presidential elections. They said privately that they felt attempts last year to boycott the March 28 vote for a constituent assembly or prevent it from happening through violent attacks were a propaganda disaster. But no new response to the new elections appears to have been agreed upon as yet.

Militarily, the Salvadoran armed forces have concentrated their resources for the past month on a major sweep through the provinces of San Vicente and Usulutan. They have also moved troops deep into areas of northern Morazan and Chalatenango provinces held for most of this year by the rebels.

But officials here note that each of the government's advances is plagued by serious weaknesses.

The military successes have come, thus far, with barely a shot being fired. The rebels' best units, highly mobile forces of several hundred men, have thus far melted away before the advance of the government's troops.

"They are going to concentrate their means at some moment, and logically they are going to try to make some action that gives them a little credibility," said Vides Casanova.

Referring to the rebels' continued attacks on the economic infrastructure, he said, "They are going to react, as always, by destroying the goods of the people, and logically in areas that cannot be taken care of--you can't take care of everything--they are capable of destroying things."

Vides Casanova would not discuss specifics, but the guerrillas have said for several months now that they are rebuilding the urban organizations that were largely destroyed in their failed January 1981 offensive, and there is much speculation that their next major move may be in the capital.

San Vicente provincial commander Col. Jose Dionisio Hernandez, also in San Ildefonso to review four special U.S.-trained battalions, said that many rebels have moved across the Lempa River into San Miguel Province. They are not being pursued there, he said, because the garrison in that area does not have sufficient resources to go after them at the moment.

Col. Reynaldo Golcher, commander of the overall "Well-Being for San Vicente and Usulutan" operation said his troops were not pursuing those guerrillas because his objective is not to kill people but to establish peace in the region.

Meanwhile, the upcoming elections are the object of increasing debate even among groups that have worked closely with the current government.

Both the nation's largest labor federation on the center-left and backers of constituent assembly president Roberto D'Aubuisson on the extreme right are calling for a postponement of the vote until next year, when the polling can be better organized and stricter provisions taken against fraud.

Moreover, a communist leader here said recently that the left may not have to develop a new response to the elections if the race between the Christian Democrats and the ultrarightist parties is as violent and bitter many expect it to be.

In a homily at the Metropolitan Cathedral today, the Rev. Jesus Delgado, speaking in the place of Archbishop Arturo Rivera y Damas, who is out of town, said that despite the government's amnesty program, more than 2,500 civilians have been killed by the government's military and paramilitary forces since the beginning of the year while fewer than 50 have been killed by the guerrillas.

The constitution to be debated this week, Delgado warned, "is on the point of being signed in a climate of violence and with the blood of brothers."

Hinton blamed the rebels last week for their representatives' failure this month to meet Stone.

Both the church and the more moderate labor leaders in the country continue calling for dialogue covering a wide variety of issues, not just talks about participation in the elections.

As Delgado said today, in many sectors of the government, despite U.S. maneuvers, the word dialogue is still "taboo," and in some circles "he who speaks it is signing his own death sentence."

In a country that depends increasingly on U.S. support and with the Reagan administration's twice-yearly certification of human rights improvements here due in less than two weeks, such attitudes could cause backing on Capitol Hill "to blow apart," as one U.S. diplomat put it.