Old foes on both right and left have battled President Jose Napoleon Duarte with renewed vigor in recent months and have taken away some of the momentum that he achieved last year with his election and launching of peace talks to end this country's civil war, according to Salvadoran politicians, foreign diplomats and other observers.

The president could win back some initiative if his moderate Christian Democratic Party scores an upset victory in Sunday's national legislative and municipal elections, which mark the first popular referendum on Duarte's presidency.

The Christian Democrats are expected to gain a few seats in the Legislative Assembly, but most observers predicted that a recently formed coalition of conservative parties would retain control of the assembly and of most local governments in the countryside.

Moreover, some of Duarte's strongest opponents are outside the arena of electoral politics and will be little affected by the elections.

Both the nation's conservative establishment -- including the business community and influential elements in the armed forces -- and its Marxist-led guerrilla movement are resisting Duarte's efforts to achieve a national reconciliation by bridging the political gap between them. They have restricted pursuit of his declared policy goals of negotiating an end to the five-year-old war, prosecuting past human rights violators and rebuilding the economy.

The U.S. government, which says that it is not supporting the Christian Democrats with covert CIA funds as it did last year, appears satisfied that Duarte is hemmed in, according to U.S. and Salvadoran political observers. Washington seems to fear that a leftward move by Duarte would alienate the right and upset the existing political equilibrium, they said.

Duarte's ascent as this country's first directly elected civilian president in 50 years marked an important accomplishment. The armed forces, which helped to steal an election from Duarte in 1972, now tolerates him in part because his election led the U.S. Congress to approve sharp increases in military aid.

In addition, Duarte's term has been accompanied by a modest purge of military security officers suspected of involvement in right-wing political violence, and by U.S.-backed efforts to build a more professional military. Killings by "death squads" have continued to decline during Duarte's term, according to records compiled by human rights organizations, and residents in bleak, battle-weary parts of the countryside in three strategic provinces said that the Army has tightened its hold in the past year.

But hopes appear dim for an early peace settlement in talks launched by Duarte in October. The armed forces and the rest of the conservative establishment reject the insurgents' demands for constitutional changes that effectively would grant a share of power to the rebels. The armed forces seem convinced that a military victory is possible in the long run, and the nation's second-largest party has come out against the peace talks altogether.

The left-wing Farabundo Marti National Liberation Front shows no sign of substantially softening its position in the talks. It remains strong in about a quarter of the country and stubbornly resists military defeat.

"The exercise of power is wearing, and the Christian Democrats are worn down," a prominent member of the party said privately. He offered an illustration of how Duarte is boxed in:

"If the conservatives remain in the majority in the assembly, then Duarte is weakened greatly," he said. But even if the Christian Democrats win, he added, "there would be another type of problem, because then Duarte would have the power to push forward the dialogue" with the guerrillas and thus encourage a backlash within the armed forces and the right generally.

"This is a serious problem," the Christian Democrat said.

On other policy fronts, the right has slowed investigations of past political assassinations and of reports of two Army massacres that allegedly took place after the president took office on June 1. Conservative parties will retain control of the national attorney general's office and of the Supreme Court even if the Christian Democrats win control of the assembly.

Only the flow of U.S. aid has kept the economy moving in the face of continued guerrilla sabotage and Duarte's ideological differences with the business community. El Salvador's balance-of-payments deficit last year, which totaled $117 million, would have been nearly three times as large without $210 million in direct U.S. economic grants.

The elections will determine the balance of power in the assembly and in the nation's 262 municipalities. The conservative parties currently hold a 34-seat majority in the 60-seat assembly, and have used it to stymie Duarte in a variety of ways. In December, for example, they slashed the presidential palace's operating budget and forced Duarte to scramble for funds to pay security guards and secretaries.

The right-wing Nationalist Republican Alliance and the less extreme National Conciliation Party, the nation's second- and third-largest parties respectively, have formed an electoral coalition for this race for the first time. Together they received 49 percent of the vote in last year's first-round presidential election, compared with 43 percent for the Christian Democrats, and most sources doubted that there would be major shifts in voters' sentiments on Sunday.

"Most political observers here that I talked to do not expect major changes, wild changes in the general outcome of the election. They would expect seats to go up or down in small numbers," U.S. Ambassador Thomas Pickering said in an interview.

Some signs pointed to a narrow, come-from-behind victory by the Christian Democrats. Party sources said that recent opinion polls showed a groundswell of support for the moderates in the countryside, where the conservatives previously have dominated.

In addition, the Christian Democrats' posters and or advertising were significantly more visible than that of other parties in recent visits to Morazan, San Miguel and Chalatenango provinces. The Christian Democrats and their one party ally -- the small, center-right Democratic Action party -- have such advantages of incumbency as access to government trucks for transporting supporters.

Finally, the Nationalist Republican Alliance has not attracted nearly as much financial support this year from the business community as it did last year, well-placed political sources said. The business community apparently has balked at continuing to back the party's leader, Roberto D'Aubuisson, who has been linked to past cases of political violence.

On the other hand, the conservative coalition has a potential advantage in its control of the Central Elections Council, the national organization responsible for organizing the election and counting the ballots.

New electoral regulations give one seat apiece on the council, and on all electoral bodies at the provincial and municipal level, only to the three largest parties. Since the second- and third-largest parties are allied in the conservative coalition, top Duarte aide Julio Rey Prendes said, "in all parts of the electoral structure, they are against us two to one."

A professional political analyst noted: "The conventional wisdom is that the Christian Democrats have a chance, and perhaps a growing chance, to pick up some seats. But it's a long way to a majority."