``This is not a struggle against the contra,`` says Ruiz, the top Sandinista official in this remote farm town of 5,000 about 100 miles north of Managua. ``It is a struggle against the United States.``

In a poor country, Yali is poorer still. Pigs, chickens and bony mongrels wander the steep dirt streets, pecking and scratching for the occasional morsel. There are few cars. Houses are made of boards, little more than windbreaks, or grimy stucco splashed with pastel paint. Bare feet and patched clothes are commonplace.

It is around, though thus far rarely in, such isolated communities that the U.S.-sponsored war against the leftist Sandinista regime is most often fought. And it is in and around such places that the anonymous death tolls of combatants and hapless civilians caught in the middle are heaviest.

Ruiz says 15 ``contra`` guerrillas have been killed in the area, but he offers no casualty figures for government troops or civilians.

Ruiz, in his mid-30s, is wearing a straw cowboy hat and bluejeans. The sole sign of his authority is a green military shirt adorned with a red-and-black Sandinista pin. If the contras ever manage to enter this town, Ruiz knows that as a member of the Sandinista political apparatus he is a marked man.

Ruiz is sitting in a sparsely furnished office looking out on the town square. The pink walls boast the usual assortment of revolutionary posters and slogans exhorting Nicaraguans to fight to the death against the contras, whom Congress and the Reagan administration recently granted an additional $27 million in aid.

``Once they knew they would get the money, they started fighting again,`` Ruiz says. ``They are harassing the population and trying to destroy our way of life and our economy.``

Across the square, in a dimly lit second-story loft heated by the afternoon sun, youthful Sandinista soldiers, male and female, talk tersely by radio to their comrades in the surrounding mountains.

They have little to say to two gringo reporters, but it appears they are relaying information from the field to the artillery crew, whose 48-pound shells can hit targets up to 10 miles away.

A soldier mumbles that the intermittent artillery fire this day is intended to harass the contras in areas that they might be. It is probably killing only trees.

Ruiz says 2,000 contras are in the immediate area, but that the jungled slopes and forests between here and the guerrilla camps along the Honduran border 35 miles north make good cover.

On a sidestreet near the square and behind a Spanish colonial church, Latin music blares from a loudspeaker.

Nearby, a prominent local man who asks not to be identified, worries that an increase in fighting over the last month is endangering the civilian population.

Like Ruiz, he accuses the contras of kidnapping peasants, campesinos, to force them to take up arms against the Sandinistas. But he also notes that some missing campesinos have probably gone off voluntarily.

``Some come back and say they were kidnapped by the contras,`` he says. ``Others never come back.``

Although officials of the Nicaraguan Democratic Force, the main guerrilla group, acknowledge that ``forced recruiting`` may occur occasionally, they argue it would be impossible to kidnap and keep thousands of campesinos against their will. The FDN is all volunteers, they say, while the Sandinistas have had to resort to a compulsory military draft.

The contras launched an offensive last month to coincide with the sixth anniversary of the Sandinista revolution. They damaged a few bridges, ambushed a few small convoys and took the Pan American Highway town of La Trinidad for four hours.

The Pan American offensive was spectacular and brief. In the hills and towns around Yali, it continues mostly out of the glare of the international media.

About two miles from Yali, in a wooded gully, the contras recently wrecked a small bridge. The few cars and trucks that use the one-lane dirt road must now ford the river.

Traffic throughout the area is light. Campesinos routinely warn travelers to turn back, saying the contras are on the road ahead. Army patrols make no attempt to turn back strangers.

While the contras may be shadowy and elusive, signs of Sandinista military activity are readily found. During a recent drive through Jinotega province, Soviet-made helicopters could be seen at a small camp on the road to Patasma and two large ground units were observed in operation farther north.

One company-sized force was strung out at dusk beside a road near Yali, busily setting up a nighttime ambush in the light rain. The soldiers waved amiably as a car drove through their midst.

Earlier in the day, in a place residents identified as Pueblo Nuevo, a cluster of wood and mud shacks that does not appear on the official government road map, the lone street was completely blocked by a military troop convoy of about 250 grim and weary soldiers in sweat-stained camouflage uniforms. Officers said they were setting out to hunt an 800-man contra force a few miles away.

Efforts to follow were thwarted by a slow-moving convoy of earth-moving equipment behind the troop trucks.

At a dam on an artificial lake about 20 miles southeast of Yali, a fortified military camp guards both sides of the road over the earthwork.

On a pole visible from the road Sandinista troops have tacked a bilingual sign echoing Ruiz`s sentiments on the nature of the conflict.