The bandits attacked just before dawn, spraying this village with small-arms fire that sent most of its inhabitants and its handful of defenders fleeing wildly into the bush.

The invaders then went from hut to hut, stealing food, pots and pans and the rags that pass for clothing here. When they came to the roofless, one-room schoolhouse, they carried off its few books and used the classroom as a toilet.

In less than an hour it was over, the marauders retreating south with their meager booty. Four villagers lay dead. Hundreds of others have yet to return.

The attack, which occurred late last month within a few miles of the city of Tete in northwestern Mozambique, was cloaked in irony, for the people of Benga are deslocados -- displaced persons who were resettled here last year after fleeing from previous attacks. They live here on monthly handouts from foreign aid donors, their children listless and silent from lack of protein and vitamins.

Now the war has caught up with them again. People who owned almost nothing, they now have even less.

Six years after it began, a faceless and shadowy war grinds on between the leftist government of Mozambique and the diffuse bands of anti-Marxist rebels, mercenaries and thugs known collectively as "Renamo," the Mozambique National Resistance movement. Like similar conflicts elsewhere in Africa -- in Chad, Sudan, Morocco, Ethiopia and Angola -- it is a war with no foreseeable end, fought between opponents who are each too weak to topple the other, yet too entrenched to be defeated themselves.

A military offensive last year by Zimbabwean troops invited here by the government appeared for a time to have turned the tide. But in the last few months, western analysts say, the rebels, using neighboring Malawi as their supply base, have recovered the offensive in the fertile, central Mozambican provinces of Zambezia, Tete and Sofala. They are believed to enjoy a modicum of tacit support there from peasants long disaffected from the government of President Samora Machel.

The guerrillas also have waged an urban terror campaign in the capital, Maputo. Last September, they blew up the main ammunition depot there in a well-coordinated operation. There have been recent attacks on factories in the city's western industrial suburbs, as well as a series of booby-trapped radios and landmines on the beach that have killed or maimed civilians.

But Renamo's main goal in this war of attrition has been economic destruction and its main victims have been villagers like those of Benga, forced to abandon their traditional homes and become refugees in their own land.

The government estimates there are between half a million and a million deslocados in Mozambique. Nearly 300,000 others have fled to neighboring countries, most of them to South Africa and Zimbabwe, according to a United Nations estimate.

"It's a population over which we have no control," said Amos Mahanjane, director of the state natural disasters office. "These are farmers, but because they have been forced to leave their land, they have no place to plant crops and so they have nothing."

In Tete, one of the hardest hit of Mozambique's 10 provinces, officials estimate there are at least 84,000 displaced persons and say thousands more are streaming weekly into Mutarara in southeastern Tete to escape rebel attacks in neighboring Sofala and Zambezia.

Aid workers say many new arrivals have neither food nor clothing. They wear burlap or plastic food-aid sacks, eat roots and leaves and dig holes along the banks of the Zambezi River bed to drink the brackish mineral water because their bodies crave its salt.

Three years ago, nearly 100,000 peasants died as massive drought, socialist economic mismanagement and rebel attacks combined to strangle food production and hinder an international relief effort. In most places the drought is over, but officials and aid workers say nearly 2 million are still at risk, mainly because of the war. Mozambique remains one of six countries on the United Nations' list of African neediest.

The government last month estimated it faces a total grain shortage of at least 440,000 tons for the next year -- nearly half its annual needs. So far, foreign donors, led by the United States, which is Mozambique's largest food benefactor, have pledged only 178,000 tons.

Renamo dates to the mid-1970s, when Rhodesian intelligence operatives set up an indigenous spy network inside rural Mozambique to monitor guerrilla movements. When the black majority took power in Salisbury in 1980, the network was handed over to South African military intelligence, which, with training and fresh supplies, transformed it into a full-fledged rebel movement.

When Machel's government began to take the threat seriously, it decided to deal directly with the movement's paymasters in South Africa, agreeing to a nonaggression pact in which Maputo and Pretoria each promised to stop aiding insurgents battling the other.

Maputo kept its end of the bargain, expelling hundreds of members of the African National Congress, the main South African resistance movement. But Pretoria did not, as is apparent from a series of diaries kept by an aide to Renamo's field commander. The writings were discovered last August when the Zimbabweans captured Casa Banana, the rebels' stronghold in central Mozambique.

The diaries, which western diplomats consider authentic, suggest that the South African military never intended to honor the 1984 accord. Resupplies of arms, ammunition and other supplies to the rebels were arranged in advance of the treaty. Col. Charles van Niekerk, South Africa's military liaison to Renamo, laid plans for training its members in South Africa and supplied explosives and timing devices for urban warfare.

Van Niekerk also orchestrated the 1984 talks between Renamo and the Mozambican government in Pretoria, according to the diaries, instructing the rebels not to accept an amnesty and even arranging to bug the negotiating room where South African Foreign Minister R.F. Botha, described as a "traitor" by the South African military, met with Mozambican officials.

After the diaries were released last September, Mozambique suspended participation in a joint security commission established under the treaty with South Africa. Despite repeated protests to Pretoria, Mozambican officials contend that support for Renamo continues, most of it channeled through Malawi, where officials believe two South African military attaches coordinate supplies and strategy. South Africa and Malawi, which maintains close ties to Pretoria, have denied the charges.

Having failed to find a diplomatic solution to the war, Machel's government has fallen back on a military one. It welcomed the arrival of Zimbabwean troops last July and gave maximum publicity to their early triumphs, including the capture of Casa Banana.

But the ragtag and dispirited Mozambican Army has failed to consolidate Zimbabwean gains. Defended by a poorly fed garrison, Casa Banana fell again to Renamo in February, reportedly without a fight.

Zimbabwean commanders are deeply suspicious of their Mozambican counterparts, believing that some serve as soldiers during the day and bandits at night. They also believe Renamo has been tipped off in advance to several military operations in which the Zimbabweans arrived at their targets only to find them abandoned.

The Mozambicans, in turn, consider the Zimbabweans, whose crisp uniforms, polished boots and functioning equipment are a marked contrast to their own deprivation, as arrogant and demanding.

Mozambican officials have acknowledged that their soldiers generally are poorly paid, underfed and badly trained. President Machel himself has publicly condemned the press-gang tactics of military recruiters who arbitrarily conscript young men from city streets. "By acting like this we are recruiting enemies," he admitted.

A major problem, said a source close to Machel, is an entrenched group of veteran officers. Most have failed to master the tactics and logistics of a conventional army, yet Machel reportedly fears they could pose a threat to his government if he tries to dislodge them.

The war remains an enormous drain on Mozambique's limited resources. Former finance minister Rui Baltazar dos Santos Alves, presenting the 1986 budget to the People's Assembly last December, said 42 percent of all spending would go toward defense. He also noted that total economic activity in Mozambique had declined a staggering 20 percent in 1985, a drop he blamed on "the harsh reality that we are at war."

Nonetheless, the government has publicly rejected talks with Renamo and has branded as false rumors that it has dispatched intermediaries to seek a negotiated settlement. A recent shakeup of key Cabinet posts appeared to strengthen those who support a hard line against the rebels.

"The only possible dialogue with terrorists and murderers is through the barrel of a gun," said Foreign Minister Joaquim Chissano in a May Day address in Maputo.

Meanwhile, farmers in the north are believed to have made a tacit deal with Renamo -- they only sell their crops to neighboring Malawi, and the rebels, in turn, confine their attacks to state-owned operations, not private farms.

Convoys of emergency food aid are regularly fired on. Even to travel to Benga, only 10 miles from the city of Tete, this correspondent was given an escort of two dozen nervous soldiers. A few miles up the road at Moatize, some of Africa's largest coal reserves lay idle because the coal cannot be transported safely by rail.

Foreign aid programs are prime targets. A UNICEF rural development project in Changara has been attacked three times in the past year and its Mozambican manager killed.

"When the bandits hear that a certain area has received goods or food, they attack," said Eduardo Arao, the provincial governor. "Then when they get near Malawi, they just disappear."

One day this month a refrigerated truck from Beira pulled into the city of Tete at sunset, stocked with frozen fish to be distributed in celebration of May Day. News spread rapidly and soon hundreds of residents, some of whom said they had not eaten fish for months, were lined up in front of the state warehouse waiting patiently. Others waited on a second line to purchase bags of soggy rolls that were the first bread they had seen in weeks.

Someone played a harmonica and someone else tapped sticks on the cracked pavement and children danced outside the warehouse on the darkened main street. Meager as it was, the shipment was something to celebrate, and for a brief moment, Mozambique's war seemed far away.