It was late 1982. A fat noncom, his sweat-stained shirt straining at its buttons atop dirty fatigues, awakened from an afternoon snooze and approached travelers on the edge of guerrilla territory in eastern El Salvador. He stood unshaven, groggy and glowering as two awkward recruits searched the car. Both showed signs of embarrassment at the image of torpor and misdirected menace in the country's hottest war zone.

It is more than two years later now. Lean soldiers with rivulets of perspiration on their copper cheeks pause from a patrol of El Salvador's northern trunk highway. Because of their repeated marches, the road remains busy despite guerrilla efforts to close it off.

A traveler remarks that their black headbands, emblazoned in gold with "San Carlos Battalion" make them look good. They smile with what looks like pride and one answers: "That is because we really are good. We are the best."

The contrast between two chance encounters coincides with more formal measures of the distance covered by the Army here in the past two years. With much U.S. prodding and money, the Salvadoran armed forces have undergone sweeping changes in size, weaponry, training and professionalism.

Salvadoran officers and their U.S. advisers contend that the transformation has given the Army the upper hand in its five-year war with leftist insurgents. Other, less committed observers recall that such claims have been made before, only to turn out wrong in the shifting cycle of battle here.

In October 1982, for example, the then-defense minister, Gen. Jose Guillermo Garcia, said the rebel movement was in its "death throes." Several months later, the Reagan administration was predicting Garcia's Army could fall apart unless it received emergency aid to combat a devastating guerrilla offensive.

The current Army-up cycle has lasted for more than a year, however, making it the longest of the war. The last prolonged guerrilla offensive, in the fall of 1983, came to a climactic end with a bloody attack on the El Paraiso Army garrison. Since then, rebel forces have not mounted a sustained series of attacks.

Army forces were hit hard on at least two occasions last year -- at the Cerron Grande dam last June and the village of El Salto last December -- but troops otherwise have carried the war to the guerrillas.

As a result, U.S. military advisers and diplomats here have slipped into a cautiously optimistic tone they previously avoided for fear of later appearing foolish. Whatever the long-term wisdom of their new confidence, the Army they are assessing has expanded dramatically.

From 7,000 men in 1981, the Salvadoran Army, Air Force and Navy have swollen to about 30,000 now. In addition, paramilitary security forces in the National Guard, the Treasury Police and the National Police have increased to nearly 20,000, meaning almost 50,000 Salvadorans are in uniform, according to U.S. and Salvadoran military sources.

This means the armed forces are within reach of the 10-to-1 ratio that classic military doctrine says is necessary to deal with guerrilla opponents. Although U.S. officials in Washington put rebel strength at up to 12,000, particularly in aid requests to Congress, President Jose Napoleon Duarte estimates their number at 4,000 to 5,000, and Gen. Adolfo Blandon, the Army chief of staff, puts it at a maximum of 7,000.

The expansion of Army forces has been fueled by a similarly dramatic increase in U.S. military aid. Since $35 million in fiscal 1981, when President Reagan took office, military aid here has leaped to $196 million last year.

The administration, seeking to continue the high military aid levels, has requested $132 million for fiscal 1985 but has begun discussions with Congress on a possible increase. In addition, U.S. officials say, Duarte's public relations efforts with Congress since his election last May have reduced legislative resistance to sustained aid appropriations, making military spending and planning more efficient.

The consistent aid flow has financed sharply improved weaponry. Under a $32 million emergency military aid package sent by executive order last spring, for example, the Army has acquired enough howitzers to equip each battalion with an artillery squad, military sources point out.

Perhaps most significantly, the swift aid jump last year paid for more than a doubling of the helicopter fleet, from 18 to about 40. In a recent battle in San Vicente province, a 200-man rescue force was airlifted aboard 20 Huey helicopters swooping down simultaneously at dawn to confront guerrilla attackers who had pinned down an Army column.

The 140-man Army unit had held out through the night until the helicopter rescue largely because of support fire from two C47 gunships, each equipped with three .50-caliber machine guns, night vision devices and sophisticated equipment that allows the pilot to concentrate up to 2,700 rounds a minute on a target.

The Air Force support that night "was so important to save that unit," said Lt. Col. Ricardo Cienfuegos, the Defense Ministry spokesman. A third such gunship is awaited. Salvadoran commanders are thinking of adding a fourth machine gun to them later, a knowledgeable source said, bringing total firepower to 3,600 rounds a minute per gunship.

Until last year, the Salvadoran Air Force offered no such night support. Its six A37 Dragonfly warplanes long have been dropping 500- and 750-pound bombs on guerrilla areas. But they are mostly limited to daylight flights.

In addition, the rapid growth of the helicopter fleet has given the Army a reaction capability it never enjoyed before. "For the first time, the immediate-reaction battalions are actually reacting immediately," complained a rebel official in a recent interview outside El Salvador.

Rebel officials say U.S. intelligence planes, including Mohawk reconnaissance craft operating from Honduras, also have made a critical difference since the beginning of last year. Swift relay of information gathered by the planes enables Salvadoran commanders to receive word almost immediately when a guerrilla concentration is spotted.

Beyond the equipment, however, is a shift more difficult to measure, the change from the slovenly soldier encountered in 1982 to the trim troops seen guarding a disputed highway this month. Military observers attribute the difference to extensive U.S. training and sweeping changes in the Army command.

For Cruz Figueroa, a soldier in the Fourth Brigade's Cobra Battalion, the difference came home when Col. Aigifredo Ochoa took over as brigade commander last fall. Under Ochoa, Figueroa said during a conversation in the hill town of La Palma, the Cobra Battalion has been spending markedly more time walking on patrol through the hills of Chalatenango province.

In exchange, he smiled, the battalion has been getting more time off "to go visit the girls." A 20-day operation through the hills and villages around La Palma usually earns a five-day leave, he said.

In addition, each soldier has received three uniforms instead of one, along with orders to keep them clean, Figueroa said. "Things are better organized now," he declared. "I think we are winning the war."

Whatever the accuracy of his boast, Figueroa's attitude contrasts with the reticence and tentativeness that often characterized units in the past.

A column sent in to recapture a village occupied by guerrillas 18 months ago, for example, was seen spending half an hour buying candy and another hour waiting out a rain before moving up the hill toward the disputed village. Walking slowly until dusk came on, the unit pulled back for the night and made it into the village only the next morning -- after the guerrillas had harangued the population, burned voting registration records and faded away.

"It hasn't been a lack of knowledge of what to do," a foreign military observer said. "It has been a lack of the requisite leadership down there at the platoon level to make it happen."

Military sources say the command changes started several months after Garcia was pressured out as defense minister in the spring of 1983. Since Gen. Carlos Eugenio Vides Casanova took over, all brigade commanders except one have been replaced, they point out, along with key general staff officers.

"The leadership is now beginning to catch up with the force expansion," the military observer said. He underlined, for example, that the number of military school cadets, who serve as the Army's line officers has shown a "dramatic increase" to about 2,000.

Salvadoran officers have a long tradition of political involvement, however. As a result, diplomatic sources warn that it is too early to judge whether the present emphasis on military professionalism will last. Ochoa, for example, mutinied two years ago to demand Garcia's ouster, and now is cited as a crack commander by U.S. and Salvadoran military officials.