Two and half months ago, the police chief in this isolated village sent an urgent message by radio. More food was needed, he said, and more shrouds to bury the dead.

But the food was slow -- excruciatingly slow -- in getting here, and by the time it did, some of the emptied grain sacks had to be used to wrap the corpses. Now graves stretch across the sandy flats outside Beida like a low range of mountains, without markers.

In all of western Sudan, relief workers estimate that between 100,000 and 150,000 people may have perished this year, although no truly reliable statistics are available. In Beida about 500 of the 17,000 people in the immediate area died here this summer, according to local officials. In Kongo-Haraza, a few miles away, 235 people died.

These figures are a fraction of what was feared. As bad as it was, it could have been much worse.

Now the end of the famine appears to be in sight, and the example of the survivors is making aid workers and economists in Khartoum rethink their strategies both for short-term relief efforts and the long-term development of Sudan.

What kept Beida and other villages alive, bringing them food just in time for the large majority of people to survive, was a combination of belated but sophisticated high-technology assistance from abroad and the lowest-technology, dirt-scratching determination of these people skilled at wringing the last bit of life from the desert. "It's been an extraordinary human effort," said Fred E. Winch, an economist for the U.S. Agency for International Development in Khartoum, "extraordinary on both sides: the recipient as well as the giver."

American grain is flown to the region on transport planes managed by the European Community, then distributed in three helicopters commissioned by AID.

The pilots navigate using satellite photographs to supplement maps that were last revised in 1929. They drop thousands of pounds of durra, a U.S.-produced sorghum grain, from cables suspended beneath their fuselages. The people here have taken to calling it "Reagan."

Where larger quantities were needed than the copters could carry, camel caravans were organized by Britain's Save the Children Fund.

The cost was enormous. Relief workers say the price of flying in grain is about 50 times more than trucking. Camels, able to carry only four sacks apiece, are three or four times more costly than trucks.

The bills have not been added up, but Winch estimates that Washington will have put $200 million into nationwide Sudanese relief efforts by year's end, on top of about $210 million already allotted to economic and development projects. Sudan, he said, now receives the third largest share of U.S. assistance in the world, after Israel and Egypt.

But whatever the cost, the last-minute improvisation and expenditures worked where, between the high-tech and low-tech extremes, all else had failed to relieve the suffering in the far west.

After more than half a decade of the drought that had brought on the famine, "we were dealing with rains like we haven't seen in years," said Winch.

The vast truck convoys put together by AID remained mired in the rain-fed wadis that lace this desert with rivers of mud. Scores of railroad cars have been stuck for months on lines chopped to bits by the unanticipated midsummer floods.

For some, especially for thousands of landless Chadian refugees who have crossed the border in the past few weeks seeking food, the suffering continues. More than 6,000 are camped outside Beida, and among the new arrivals, three or more are dying each day. Thousands more Chadians have arrived at other camps. The airlift and camels continue for them, with a few trucks also on their way, finally, now that some of the land is drying out.

Yet the relief effort by itself could not bring nearly enough food to have kept these people alive through their summer of starvation and isolation.

The European Community estimates that it flew at most 10,000 tons of food into western Sudan from the end of May to the end of September. More than 10 times that amount was thought to be required.

Early on in the famine, the people here ate meat. Their herds were dying anyway. Nutritionists in Khartoum believe that the protein intake of this region's population actually went up as a result.

After the rains began the people here ate the grasses that began to grow. But before that they ate leaves off thorn trees, and before that they ate the bitter, poisonous berries of the mokheit bush.

When they could find ant hills, they dug them up to retrieve the small quantities of grain the insects had stored away.

Even in places such as the Asserni refugee camp outside the town of Geneina, where "Reagan" distribution is now a regular event and prefabricated warehouses are full of grain, women like Hadia Harum, 45, continue to gather mokheit berries and the seeds of grasses.

For almost two months, from July into August, Harum and her family ate nothing but the meager fruits of the woody bushes that dot the desert even in the worst droughts. If they are not boiled for at least a day, the pea-like berries burn like fire in your mouth, Harum said.

But she and all her children survived, she said, and now she keeps a couple of bowls of mokheit in her hut and gathers grass seeds to supplement her diet of durra. Like many of the women in the camps, she has no idea where her husband is.

"The men escaped," said Geneina council member Ismael Abdullah. When the famine got bad, they left their families and trekked toward the towns of Nyala or El Fasher or Khartoum or into the desert to survive or die by themselves.

According to aid workers, this is an old pattern in this oft-ravaged part of the Sudan, and as a result the women like Harum have a degree of self-reliance and self-confidence unknown in much of the rest of the country.

This skill at survival is the element that many aid workers say they failed to take into account earlier in the year when they predicted that as many as half a million people would die in western Sudan.

And it is the strength and resilience of the most basic forms of agriculture here that are now being examined by economists in Khartoum as the possible key to the country's revival in coming years.

For most of Sudan's recent history, development was based on projects involving vast irrigated tracts of land growing cash crops such as cotton.

But while the initial yields of these agribusinesses were high, their cost in imported fertilizers and machinery also was enormous. When money began to dry up in this nearly bankrupt nation, so did the crops.

Half the foreign exchange earned by such farms had to be spent to keep them going, according to Ali Hassan, an economist with the Arab Authority for Agricultural Investment and Development.

But it was the "traditional sector," mostly the hardscrabble dirt farmers, who were providing Sudan with food.

"The resilience of the economy has come largely from this sector," said Hassan, whose analysis was backed up by Winch and other economists. But the Sudanese government and, until recently, most international assistance programs paid little attention.

It took the famine to force the realization that this traditional farming that Hassan calls "the chassis of the Sudanese economy" was where more funds and assistance should be concentrated.

While productivity plummeted on the grand irrigated projects in the early 1980s, "in spite of all the problems we didn't have any starvation," Hassan said. "The traditional sector was doing the job."

It was not until 1984, in the worst of the drought, that the long-neglected "chassis" was broken.

"The car stopped and we became a nation of beggars," said Hassan.

Now there appears to be a second chance.

The people here have survived despite everything, finding resources that others might never have imagined.

In the wadi near the Asserni camp, children angle for slimy catfish eight or 10 inches long that have migrated from distant lakes up wadis that had been dry for the better part of the decade.

Now the worry is that when as many as 60,000 tons of grain destined for the west begin to arrive in the approaching dry season they will drive down the prices of the crops that are just about to come in. If that happens, farmers who once had no food will be left with something to eat, but no money for anything else.

There are also worries among aid workers that as little as half the available land was planted, because farmers ate their seeds, or were too weakened by hunger to till the land.

But for those who were able to plant when the rains began, the famine is all but over. Their cone-roofed huts are surrounded by fields of five-foot-high millet and sorghum.

Plentiful harvests are expected for next month. If the locusts don't come, if there is a little more rain, most estimates suggest that Sudan this year will produce not only enough grain to survive, but a surplus.