Timbuktu was lucky last year. It rained, the locusts stayed away and, with some help from the outside, farmers produced one of the best harvests in half a century. Farmers in nearly all the countries that hug the southern Sahara Desert's harsh border produced similar bumper crops that filled graneries and children's bellies from Senegal east to Niger. The good fortune of 1988 and 1989, welcome as it is, also illuminates the profound problems facing these poor nations struggling to feed themselves _ problems that range from a birthrate that outpaces production to a marketplace that stacks the deck against even the hardest-working farmer. Experts note that, even with the bountiful harvest in most countries, sub-Saharan Africa imported nearly 9 million tons of cereal grains in 1988. ``Nonetheless, the 500,000-ton grain surplus is spectacular news,'' said U.S. Ambassador Robert Pringle. ``Now everyone is wondering how to export what they have grown.'' Abduleh al Kalifa, hip-deep in a field of emerald-green wheat rippling in a desert wind near Timbuktu, doesn't worry about exporting. He just wishes he could sell his surplus 30 miles away, in Timbuktu. ``Five years ago there was no rain, nothing to eat,'' said Kalifa, 36, already middle-aged in a nation where the average life expectancy is 49. ``Foreigners gave us everything. These last two years, the harvests were good. We have hope and two warehouses are full. ``We have more than we can eat, more than we can store and we can't sell the rest,'' he said. ``How can we get our grain to town if there are no roads? How can we compete with grain from other countries? How can we earn enough money to buy food when there is another drought?'' Mali's last drought left its mark on the children. Two-year-olds are solid and round, but children born in the drought of 1984-1985 are spindly, apt to suffer from chronic malnutrition. ``If you are malnourished, a few good meals will make you feel better, but you are still malnourished,'' said Leo DeVos, director of the United Nations Children's Fund in Mali. ``The whole country is like these children. It will take more than a couple of good harvests to put the country back on its feet. ``Still, it's nice to see the green,'' he said. ``It is the color of hope.'' When UNICEF arrived five years ago with emergency food, the government was in chaos, people were starving and huge numbers of refugees arrived in cities each day from the barren countryside. Enormous need remained when the crisis ended, so UNICEF and others stayed on to help. The United States, which spends about $30 million a year in Mali, now helps entrepreneurs and small farmers. West Germany built warehouses for reserves and a highway that spans a nation as large as Texas and California combined. France, Italy and others fight the advance of the desert, dig wells, organize cooperatives and help in dozens of other ways. UNICEF has concentrated on Timbuktu, a once-mysterious oasis that still evokes romance and adventure. Centuries ago, Timbuktu was a crossroads of caravans, a center of learning and a garden in the desert, where the river ran deep and trees hung heavy with fruit. Now, the advancing desert has tied a noose of dunes around it and many donors have written the city off as a lost cause. With funds donated by Italian labor unions, UNICEF installed pumps to make use of Niger River water and drilled wells to tap ground water for irrigation. ``We wanted to set an example, to show what could be done in even the most precarious situation,'' DeVos said. One result of the five-year project was the field where Kalifa and his neighbors grew a 15-ton grain surplus, little of which can be sold. The Malian government used to have price controls, which kept food costs down and made urban voters happy, but discouraged farmers because of the low return on their labor. Controls were abolished at the insistence of the World Bank and International Monetary Fund. International donors and lenders also demanded that Mali eliminate protectionist measures and subsidies to farmers. Their message was simple: No open markets, no aid. ``We have a long-term commitment to food aid, in return for which we ask that the entire cereal market be freed,'' said Dennis Brennan, director of the U.S. Agency for International Development in Bamako. With the market wide open, rice from Thailand and Louisiana costs less in the Timbuktu bazaar than grain grown down the road. ``The little guy works like crazy to grow something, pulling grain from soil that is poor, in primitive conditions and in a climate that is never favorable, even when there is no drought,'' said Giovanni Fiore, director of UNICEF's Timbuktu project and an Africa veteran. Then, when the farmer produces a surplus, there are no buyers. No one in the villages has any cash and consumers in Timbuktu buy whatever is cheapest. ``It comes from Europe or the United States where farmers receive subsidies,'' Fiore said. ``How can a Malian compete? He has no subsidy. All he has is taxes and the high cost of the pump, gasoline, oil, fertilizer, all of which has to be imported at double, triple, 10 times the cost to an American. ``Meanwhile, the donors tie aid to an open market in which farmers from developed countries can sell their surplus. So our farmers eat what they can, store a little, which will last a year or two, and when there is another extended drought, there will be famine.''