The Sandinista government and its guerrilla foes are waging a bitter war in the lovely green mountains of northern Nicaragua, competing for the support of approximately 100,000 peasants who live in poverty and mostly want to be left alone.

Each side is using military force to strike at the other's existing base of peasant support, and each is carrying out grass-roots political work to try to build new networks of backers. Among the harsher tactics employed are the government's forced transfer of thousands of suspected rebel sympathizers to new homes and raids by the rebels -- known as contras, or counterrevolutionaries -- on state farms and cooperatives to discourage peasants from allying with the Sandinistas.

Both sides recognize that the military struggle in this strategic region will be won or lost according to who gains the backing of the rural population, but so far neither has gained a decisive advantage, according to a variety of residents interviewed during a three-day trip to the area last month. Many of the peasants are cautiously neutral, and the remainder are divided sharply between those who actively support the Sandinistas and those who back the contras.

"You don't want to go with one side because of fear of the other," Maria Agdalina, 28, said in this government stronghold nestled among mountains where the contras are said to enjoy widespread support. A Sandinista agricultural official said: "The peasants are caught between two swords."

The government has enjoyed military gains in the first half of this year, as an offensive launched in January succeeded in pushing most of the contras back into their sanctuaries in Honduras by March and April, according to Nicaraguan officials and diplomats in Managua and Tegucigalpa. The guerrillas began infiltrating back into Nicaragua in May, however, and the contras claimed to be planning a big push this summer following the U.S. Congress' vote to provide them nonmilitary aid.

"At the start of this year, owing to a lack of resources, we were operating only at 25 percent to 30 percent capacity. Now we are at 65 percent to 70 percent, and we hope that in coming weeks we will be able to operate at 100 percent capacity," Frank Arana, spokesman for the Nicaraguan Democratic Force, said in an interview. The force, known by its Spanish initials FDN, is the largest contra group and fights mainly in northern Nicaragua.

The northern front is widely viewed as critical because it is the contras' principal gateway to the country's western region, where most Nicaraguans live. Both the Sandinistas and their hero, Cesar Augusto Sandino, had major bases in the northern mountains during their guerrilla struggles against the now-deposed Somoza family dictatorship. The two main contra forces apart from the FDN -- the Indian group Misura on the Caribbean coast, and Eden Pastora's fighters based along the southern border with Costa Rica -- operate in relatively isolated regions.

The northern mountains, a maze of sharp ridges and deep valleys, are covered with thick vegetation that the current rainy season has turned bright green. Even the better roads are unpaved and filled with rocks and mud patches, and it can take more than an hour to travel 10 miles.

The peasants live in crude, wooden shacks, usually with metal roofs, and tend small plots of corn and beans that make up their basic diet. The better off have a few cattle or a small plot of coffee, the region's most valuable export crop.

In this battleground, the basic rule is that the government controls the larger towns in the valleys while the contras are strong in the mountains. Peasants living in Sandinista-dominated zones, and particularly those who are involved in cooperatives or other government projects, appear to support the government.

"I'm with the Sandinista front because two of my sons are in the Army and because I have a third buried with them," said Paola Hernandez, 48, a cooperative member here.

In the mountains' barely penetrable upper altitudes, however, contra columns are able to travel and have access to food, information and recruits.

"In areas far from the cities, the people support the contras," a farmer near here said.

The contras draw support primarily because of the peasants' unhappiness over the military draft, economic problems and what is called the "communism question," according to FDN and Sandinista officials and area residents. On May 16, an FDN column stopped about 15 vehicles on a road five miles north of here, and the contras' commander delivered a political talk to those assembled, residents said.

"He said that under the FDN, you wouldn't have to stand in line to buy a needle or fuel. He said that the FDN was fighting against communism and for the Roman Catholic Church," recalled a middle-aged man who was present.

But residents also said the FDN has lost some support because of its policy of economic sabotage, which has included blowing up bridges and attacks on the coffee harvest that ended in April. Charred wrecks of trucks and jeeps, damaged in contra ambushes, are frequent sights beside roads.

Moreover, the contras seem to have alienated permanently those peasants who have embraced the Sandinista revolution and who thus have become a target of contra attacks. The FDN systematically attacks government-run farms or cooperatives, asserting that such projects are legitimate military targets because they are defended by armed volunteer militiamen.

In a typical attack on June 9, about 200 contras attacked a cooperative at Valle El Cedro northeast of here. They routed the 60 militiamen defending the farm in a three-hour attack, killing 10 militiamen and two civilians, including a 2-year-old boy, survivors said. The contras then used gasoline to set fires that burned all of the cooperative's buildings to the ground.

"They told us they would kill us if we continued living in a cooperative," Maria Siles said.

The government has its own method of dealing with peasants who sympathize with the enemy: it forcibly moves them to relocation camps where they cannot continue to aid the contras. Sandinista officials said they were not certain how many persons in the north had been moved, but the government has outlined plans to relocate 13,000 families in this area.

Some of the relocated persons are government sympathizers moved out of the way of future contra attacks, but many and perhaps most are active or potential contra sympathizers.

"There are people here who are part of the social base of the enemy," Antonio Zamora, the government's political representative in Pantasma, said of the 43 families at the Estancia Cora relocation camp here.

Some of the refugees were transferred here from hamlets just a few miles away that were described as contra strongholds. They were cautious about discussing their political sympathies, but Mercedes Herrera, 40, noted: "We wanted to stay in our own places."

The government also has sought civilian support by building health clinics and schools, and by distributing land in an attempt to give peasants a stake in the revolution. At the town of El Cua, for instance, a six-room health clinic was built two years ago and was found last month to be stuffed with boxes of medicines and equipped with a microscope, baby scale and a centrifuge for simple laboratory work.

FDN spokesman Arana said that each contra military unit includes a paramedical staffer who distributes medicines to the peasants and that the FDN also supplies machetes and other farm implements to peasants. Neither claim could be confirmed independently.

While both government and guerrillas compete for the peasants' sympathies, however, many residents and other observers said that the peasants gladly would adjust to being governed by either side as long as the war would end.

"They learn to live with the contras when they come in, and they learn to live with the Sandinistas when they come in. The people want to live their own lives," a diplomat in Managua said.