RIO BLANCO, NICARAGUA -- Government sympathizers in this farming town celebrated the eighth anniversary of the Sandinista revolution July 19 with the sound of rebel mortar fire booming in the surrounding hills.

Seven months into a key U.S.-financed offensive, the rebels, known as counterrevolutionaries or contras, were closing in for the first time on Rio Blanco, nestled in the rain-drenched mountains of Matagalpa province in north-central Nicaragua.

But although about 250 heavily armed contras skirmished all week with government forces in nearby hills, they never moved on the fortified town.

The battle that did not happen showed how successfully the contras have extended their war against the leftist Sandinista government to distant corners of Nicaragua, and how far they still are from loosening the Sandinistas' grip on rural areas.

Before dawn July 18, on the eve of a day of anniversary speech making in Rio Blanco, contras swept down on the nearby Rafael Martinez cattle cooperative, witnesses said. They killed six militiamen -- slitting the throats of two -- and two civilians, one a 4-year-old girl. One contra was killed.

On July 19 contras attacked another cooperative, engaging a more seasoned militia unit in a five-hour firefight that cost the rebels nine fighters, according to witnesses and town authorities. One militiaman died.

In quick succession last week contras ambushed military trucks and held up civilian traffic on the muddy roads, and engaged Sandinista Army regulars in running battles in nearby hills. Local authorities claimed to have buried about a dozen contra dead while reporting only three Sandinista soldiers wounded.

At the week's end the contras faded away without challenging the defenses Sandinista strategists had crafted for Rio Blanco and dozens of rural towns like it. "We are not in a position to occupy and hold a town for now," acknowledged Luis Moreno Payan, who under the nom de guerre Mike Lima is one of the contras' most experienced field commanders, in a recent interview.

The verdant hilly pastures around Rio Blanco are a natural contra breeding ground. They are dotted with tiny hamlets, miles from any road, inhabited by cattle-raising peasant families who have little in life except a proud sense of independence. They reject collectivist Sandinista policies telling them where to market their meat and milk and what government organizations to join.

Whole families have joined the contras. But in 1985 and 1986, while official U.S. aid was suspended, contra commanders pulled most of their forces back into base camps in Honduras leaving Matagalpa in an uneasy peace.

As contra forces have filtered back into Nicaragua since January they again were welcomed with food and vital information at many outlying shacks, both contra and Sandinista officers said in recent interviews.

"Most people who live in those hamlets have relatives fighting with us. We work on the basis of family ties," Mike Lima said. "When I go into combat near an area, I try to take fighters with me who are from there. When we pass by, the people say: 'Hey, that's my Uncle Pedro.' It's very unusual for one relative to sell out another. That's our big strength."

There is also discontent with Sandinista policies in the heart of many towns. Before the 1979 revolution Rio Blanco was a trading post where merchants thrived selling horseshoes and fencing wire. But years of shortages under the Sandinistas ruined their businesses.

"If I had the money I would have left Nicaragua," grumbled one bitter store owner. "Now all I can do is wait and suffer and hope a change is coming."

"People are afraid to say what they think. But I bet you would see many happy people if the contras marched into a town," said one Roman Catholic clergyman who works in Matagalpa parishes.

However, the Sandinistas have driven a political and military wedge into the countryside and the towns, attracting new support from both.

Farming cooperatives where most able-bodied men are volunteer Sandinista militiamen ring Rio Blanco.

"The Sandinistas put up an armed human wall between us and the towns," Mike Lima said.

The cooperatives drew peasants who were repelled by contra practices of burning farms and murdering those they suspected of collaborating with the Sandinistas. The goverment agrarian reform gave the cooperatives new farming land as titled, private property. Some peasants just liked leaving the isolation of their hamlets.

"We have more communication now," said Mauricio Rodriguez, the president of a cooperative named German Pomares, with a rusty AK47 rifle hanging from his shoulder on a piece of twine. "We go to government offices and they tell us about things happening all over the country. Before the revolution we didn't have anyone to talk to."

This year cooperatives have been the main target of contra operations. Sandinista leaders criticized the actions as striking economic, not military targets. Because entire peasant families live on the cooperatives, it is common for unarmed civilians to be killed in the attacks.

The Sandinistas also armed their followers in the towns. State Security Police officials in Rio Blanco said armed supporters include 300 Army reservists, 150 militias, dozens of members of Sandinista block committees plus an elite cell of State Security collaborators -- all in a town of 3,500.

In many towns the State Security chief is the ruler. Security police jail residents for six months or more on the slightest suspicion that they have collaborated with the contras. This year hundreds in rural Matagalpa have been imprisoned.

In the nearby town of Matiguas in mid-June residents awoke one morning to find contra pamphlets littered across town. Police immediately rounded up about a dozen suspects, including the brother of Emperatriz Martinez, a secretary at the Catholic parish.

Security police would not allow Martinez to see her brother in the Matiguas jail or send him medicine for his epilepsy without a written prescription, according to the Rev. Ignacio Urbina, superior of the Franciscan order in Nicaragua who is also a parish priest in Matiguas.

Martinez and her brother's wife set out on foot to their rural home to fetch the prescription.

That trip July 3 ended with the most traumatic event for this region so far this year: the death in a land-mine explosion of a Salvadoran Franciscan friar, Brother Thomas Zavaleta, 40.

Zavaleta was the first Roman Catholic clergyman to be killed in Nicaragua's six-year-old war.

With dark approaching, Urbina and Zavaleta decided to take a pickup truck to drive the women back to town. They met them halfway. Their tire tripped the mine on the way back across the same muddy road, ripping the motor completely out of the chassis and flipping the vehicle upside down.

Zavaleta died instantly. Urbina suffered a broken neck. Martinez was in a coma for three weeks and remains unable to talk. Martinez's sister-in-law, Digna Castellon, had light injuries.

There was no proof of who had placed the mine.

Contra leaders denied that their forces had planted the mine. But contra fighters were supplied with antitank mines by the CIA and have set mines in roads from the northern border to southern Nicaragua in recent weeks, contra sources said.

Reuter news agency last week distributed photographs of contras setting mines in a public byway in southern Chontales province.