SAN SALVADOR -- When Jose Napoleon Duarte was elected president of El Salvador in 1984 on a populist platform of political and economic reforms, one of the main pillars of his support was organized labor.

Today that support has all but evaporated amid economic austerity, continuing civil war and divisions in the union movement. The divisions have coincided with increasing agitation by leftist unions that the Duarte government says serve as fronts for Marxist guerrillas, and with a politically charged controversy over the role here of the American Institute for Free Labor Development, an arm of the AFL-CIO.

El Salvador's unions have become an important sector to watch as Duarte struggles to govern this embattled country under constant pressure from the left and right. According to rebel documents recently captured by Salvadoran security forces, the leftist unions and other legal antigovernment groups are key elements in a guerrilla strategy to step up activities in the capital and try to foment an "insurrection."

{In the latest violent incident, security forces opened fire Wednesday to stop a march by striking antigovernment workers who vandalized buses, stoned a government building and lit bonfires in the street during their procession, Reuter reported. Three persons were wounded during 10 minutes of police shooting, mostly into the air, the news agency quoted witnesses as saying.}

As a whole, the labor movement also is expected to be a major factor in March 1988 elections -- for a 60-member National Assembly and 262 mayors -- that will determine whether Duarte's Christian Democratic Party retains the balance of political power in the country.

Formerly considered the most powerful in Central America, El Salvador's unions were ravaged in the early 1980s by right-wing death squads that kidnaped and murdered thousands of leftist suspects. Among the victims of rightist repression were two employes of the American Institute for Free Labor Development, who were gunned down with a Salvadoran labor leader in the coffee shop of the Sheraton Hotel here in 1981.

The Salvadoran union movement -- including leftist organizations -- has recovered considerably since Duarte was inaugurated three years ago and began trying to limit human rights violations.

In February 1986, a month after Duarte announced an unpopular package of economic austerity measures that included a 100 percent devaluation of the currency, leftist unions reorganized themselves under a new umbrella organization, the National Union of Salvadoran Workers (UNTS). The economic package and subsequent austerity measures also have alienated large segments of a centrist labor federation, the National Union of Workers and Peasants (UNOC), according to union and diplomatic sources.

The two labor federations have been competing bitterly for members and recognition, with each claiming to be the largest and the most representative of the Salvadoran working class. The UNOC claims 360,000 members and the UNTS claims 250,000, but each accuses the other of inflating its figures.

The American Institute for Free Labor Development supports the National Union of Workers and Peasants, which it describes as an organization of "democratic unions," and strongly opposes the National Union of Salvadoran Workers, which it says consists of "Marxist-Leninist unions" dedicated to the goals of the Farabundo Marti National Liberation Front (FMLN).

In support of this characterization, the American institute cites what it says are "revealing" rebel documents captured by the Salvadoran military in April 1985 and the account of a guerrilla defector, Miguel Castellanos, who was interviewed by an AFL-CIO delegation in January. The documents describe efforts by the Central American Revolutionary Workers Party -- one of five organizations within the rebel FMLN -- to create a guerrilla-controlled labor front, disrupt pro-Duarte unions and provoke an "economic crisis" through the rebels' agents in the labor movement, the institute says.

The head of the National Union of Salvadoran Workers, Marco Tulio Lima, charged in an interview that the documents were fakes.

Like Duarte, the American institute has come under attack from the left and right, with both sides demanding its ouster from the country. Lately, the left has been more vehement in calling for the institute's expulsion.

At the core of the controversy are charges that the American institute, in collusion with the U.S. Embassy here, has been engaged in "buying" unions out of the leftist federation. The institute and the embassy deny this allegation.

According to a March 14 article in the U.S. magazine The Nation, the institute and the embassy have collaborated to try to "ruin the opposition trade union movement in El Salvador." The article cites secret embassy cables as revealing a plan to "pick off UNTS member unions one by one." It says one union leader, the head of a formerly pro-Duarte federation called the Popular Democratic Union, was "lured" out of the UNTS by the American institute in November 1986 "with an initial payment of $3,000 and the promise of more."

In a reply, the institute denied ever having tried to buy off the Popular Democratic Union, which it said had voted to withdraw from the UNTS on its own. It said this action then made the union eligible for assistance from the institute, whose rules prohibit aid to unions linked to the guerrillas or the communist World Federation of Trade Unions.

"When they left, we helped them out some," an institute official said. He did not dispute the $3,000 payment to the Popular Democratic Union, but said this was for "logistics and educational support."

"There is a lot of division within the union movement here as a result of internal problems within the unions," the official said, citing political disputes and "personal power struggles."

Another controversy has swirled around two rival unions at the government's national telecommunications agency, which is traditionally headed by a ranking military officer. The UNTS has charged that the American institute set up a "phantom" union, called ASTA, to compete with another union, known as ASTEL, that is affiliated with the UNTS. Each rival union claims to have been established first and to represent the bulk of the agency's 5,800 workers.

Three recent defectors from ASTA charged in May that its president was receiving $200 a month from the institute, which they said was trying to undermine ASTEL.

The ASTA leader, Carlos Hurtado, said the institute payments were to support the union's activities. He said he had left ASTEL last year when he realized the union was "directed by the communists."

Hurtado also criticized the telecommunications agency's management, which he said refused to negotiate with either union. The government has largely lost its labor support because Duarte "hasn't done anything for the union movement," he said. "The unions have been used to get Duarte elected, and then left by the wayside."