SAN JOSE LAS FLORES, EL SALVADOR -- Thousands of Salvadorans, returning to their homes from refugee camps with the hope of building new lives, find themselves in danger of again becoming trapped in the violence they had fled.

Now, after resettling in guerrilla-controlled territory, they try to maintain a precarious balance between their fear of the Army and rebel demands for support that could lead to military retaliation, many former refugees and other residents of northern Chalatenango province told reporters during a four-day trip to the area.

The return of the refugees also complicates the U.S.-backed military's counterinsurgency plans by having civilians in combat areas, making it more difficult to track and fight the guerrillas and increasing the risk of abuses against civilians.

Both sides recognize that the war is more psychological and political than military, and the resettlement has set off a struggle for the loyalties of the people here -- a struggle the military seems to be losing.

More than 6,000 civilians have returned to their homes in the region in the past 18 months. More than half are children under 13.

More than 4,000 returned in November from refugee camps in Honduras with the assistance of American church groups. Residents of San Jose Las Flores, 35 miles northeast of the capital, returned in late 1986, mostly from church-run camps in El Salvador.

On a trip through the dry hills and valleys in the sparsely populated area to visit several towns, two reporters were able to get a glimpse of the people's lives and their struggle for survival.

"We returned because life in the camps was unbearable," said one old man. "We believe we have the right to live on the land where we were born. The government did not give us this right, we had to struggle to win our right to return."

Most said they fled their homes, largely in guerrilla-held territory, in the early 1980s because of the brutal military sweeps and aerial bombing that left scores of civilians dead, houses destroyed and possessions burned. Their fear of the Army has not diminished.

While openly hostile to the Army and government, and clearly comfortable with a constant guerrilla presence in town, villagers insisted that there is no formal link between themselves and the insurgents, an assertion repeated by top rebel political and military leaders.

The military disagrees and views the government's decision to allow the resettlement as a victory for the insurgents.

"These people are politicized masses of the FMLN, who are family members of guerrillas," said Col. Mauricio Ernesto Vargas, head of military operations. "From the military point of view, it was a mistake to allow them to return. They give cover to the terrorists and help supply them."

The FMLN is the Spanish abbreviation for the Farabundo Marti National Liberation Front, an alliance of five Marxist-led armies seeking to overthrow the U.S.-backed government. More than 60,000 people, mostly noncombatants, have died in the eight-year-old civil war.

Life is spartan in the hard-scrabble towns set on the slopes of steep, barren hills that divide the land into countless valleys. There is no electricity, running water or medical attention.

Because of increased Army sweeps through the area and the rebel presence in the towns, the threat of violence is constant. The people largely blame the military, and sometimes the Army's conduct does little to allay their deep-seated fear of the soldiers.

One day last week, after reporters had slipped into San Jose Las Flores, a 36-man Army patrol surprised four young guerrillas loitering in the plaza.

The soldiers opened fire with M16s, a grenade launcher and an M60 machine gun, damaging some walls and narrowly missing startled civilians.

During the fire fight, three guerrillas got away, but one 14-year-old was wounded in the side,

According to witnesses, he put down his gun and shouted, "I surrender." The soldiers asked him how many guerrillas there were in town, and he answered four.

"He is lying, kill him," a soldier reportedly responded, and another soldier allegedly opened fire at close range with an M16, shooting the youth three times in the head, killing him instantly and splattering blood across the cobblestoned street.

As soon as the soldiers withdrew, villagers wrapped the body in a sheet, dug a grave in the town cemetery and buried him with a small plastic bag of his possessions.

More than 100 villagers attended the funeral, where a nun assured the people that life came from death and urged them to continue their struggle for "justice, unity and solidarity."

No one seemed to blame the soldiers for opening fire on the guerrillas, but the excessive firepower and killing a wounded man angered them.

"The soldiers are pigs," one woman whispered. "They respect no one. They talk about human rights, and they killed him after he surrendered. They are pigs."

While their dislike and fear of the military is obvious, the civilians' relationship to the FMLN is less clear.

The FMLN clearly lays down the parameters within which the elected leaders of each village operate. The guerrillas act as a police and justice system when things get out of hand.

"We orient them on certain points, but they are free to organize as they want," said Commander Douglas Santamaria, chief political-military officer in the area. "We do not try to tell them what to do."

Villagers sell food and supplies to both the guerrillas and Army, on their occasional sweeps.

The rebels said they are careful to leave towns at night.

"We do not want people suffering because of us, and we do not want to give the Army any excuses," said Santamaria.

Walls are plastered with FMLN signs laying out the guidelines: the cardinal sin is passing information to the Army. Also prohibited are drinking of alcoholic beverages, stealing and participation in upcoming elections for the national legislature and municipal officials.

"If someone is making liquor, we expel them from the zone," Santamaria said. "If someone is spying for the Army, we either throw them out or kill them. They are the enemy."

The rebels and civilians expect the Army to crack down on them soon.

"They do not want us here, they want us killed or gone," said one man. "The government has never taken us into account, why should we take them into account? Soon they will move against us, but we are struggling to live as human beings."

Col. Vargas acknowledged that it was a complex problem, with no easy solution.

"It is not just a military problem, but an economic and social problem as well," Vargas said.

Asked how long the military would tolerate the resettlement, Vargas said, "Until President {Jose Napoleon} Duarte says not to. It is not a unilateral military decision."

"These people are the sea the terrorists swim in," Vargas added. "They need the sea to survive, that is why they have sent the people back."