In a grandiose bid to leap ahead 15 years in only five, Brazil went on an orgy of development spending, financed heavily with foreign funds borrowed in the late 1970s.

Today, scarcely a decade after it began its great leap forward, the country has slid back to where it started.

It is recovering from the severe recessions of 1982 and 1983. But at its current rate of recovery -- about 5 percent a year, a rate that may be difficult to sustain -- it will be 1990 before Brazil reaches the level of prosperity it achieved in 1980.

"We lost a decade," lamented Luis Paulo Rosenberg, the top economic adviser to new President Jose Sarney.

Brazil is not alone there. The economic and debt crisis of the 1980s has taken a severe toll on nearly every Latin American country.

But Brazil, the region's biggest country and its biggest borrower, differs in one key respect from many of its neighbors: It has something to show for its $100 billion mountain of debt.

The military government that last March handed over power to civilians for the first time in 21 years left a vast network of completed and soon-to-be-finished development projects -- ranging from oil production to hydroelectric facilities to dams, roads and railways -- that are critical to the long-range industrial development that Brazil so desperately needs.

The military also handed Sarney a host of intractable problems. The big foreign debt costs Brazil more than $10 billion a year in interest payments. That is equivalent to 4 percent of the country's total economic output and could pose a serious obstacle to future economic growth.

Sarney also inherited a 220 percent inflation rate, a large and often inefficient state-owned industrial sector and a plethora of neglected social problems.

The government's own domestic debt has grown dramatically, driving Brazilian interest rates to dizzying levels that could choke off private investment in the future. In large part, the big domestic debt is an outgrowth of the need to pay the interest on the foreign borrowings.

Unlike many debtors, Brazil sells more than enough goods abroad to generate the dollars it needs to pay its foreign debt. But the government owes 70 percent of the foreign debt, while government enterprises generate only 20 to 25 percent of the country's foreign revenue, according to Marcilio Marques Moerirari, a top executive of Rio de Janeiro's Unibanco.

To buy the dollars from exporters, the government has borrowed cruzeiros heavily, in much the same way the U.S. Treasury borrows dollars to finance the U.S. budget deficit, the banker said.

The solution to Brazil's problem would be to cut federal spending enough in enough areas to permit it to buy dollars without borrowing. That is the solution that is advocated by the International Monetary Fund.

But the country's new president, Sarney, also is trying to address some of the festering social problems -- dire poverty, hunger and malnutrition, unemployment, inadequate housing and inferior education.

"The social problems here are so acute that Sarney and key advisers like Planning Minister Joao Sayad believe they have to take the calculated risk," said a top official of a foreign bank based in Rio de Janeiro.

It is a balancing effort that so far has proved impossible.

Government borrowing has continued to be strong in the early months of the Sarney administration.

Sarney, who assumed the presidency in April when president-elect Tancredo Neves died, has sharply criticized the programs advocated by the IMF because the austerity and hardships they visit on the people.

Planning Minister Sayad and economic adviser Rosenberg also believe that a looser monetary policy would make it easier for the government to pay the foreign debt and redirect government spending. They also believe freer money would bring down interest costs, which are a major part of the budget deficit.

Sarney imposed price controls and bought himself a few months of lower inflation -- price increases slowed to an annual rate of about 150 percent in the early summer. But last month prices rose 14 percent -- an annual rate of about 380 percent. Analysts are worried that last month's price jump may signal the beginning of accelerating Brazilian inflation, which in itself would severely hurt economic recovery because rising prices make investment decisions difficult.

Sarney is trying to demonstrate to the vast majority of Brazilians that living conditions are better under a democracy -- the "New Republic" as Brazilians have taken to calling it -- while at the same time recognizing that, in an era in which foreign funds are hard to come buy and foreign bills are big, that the country must continue to live austerely.

Sarney, however, labors under a severe handicap. He has no political base. Until 18 months ago, he headed the military party. After he broke away, he joined the opposition PMDB and was picked by Neves to be his running mate. Neves took ill on the eve of his inauguration and died before he was ever sworn in.

Sarney is "viewed as a traitor by many and is suspect among his new colleagues," according to a veteran Brazilian politician.

Sarney also had to work with an inherited cabinet that was divided over the short-term approach to solving Brazil's economic problems, which includes reaching a new economic agreement with the IMF and stretching out repayment of the scores of billions of dollars it owes commercial banks.

Finance Minister Francisco Dornelles had been the head of the more orthodox side of the team. He advocated tight spending and money policies to reduce inflation and rein in the government's massive deficit spending which has driven interest rates to about 24 percent after inflation is factored out.

But late last month, Dornelles resigned, giving Planning Minister Sayad clear preeminence in the economic field. Like Dornelles, Sayad said he wants to reduce Brazil's big budget deficit, but while at the same time taking steps to reduce social problems. He said he is convinced Brazil can do both if its policies are aimed at reducing interest rates. Because interest payments on outstanding domestic debt are a major factor in the budget deficit, by reducing rates, the government will reduce the deficit.

Celso Martone, an economics professor at the University of Sao Paulo, said that sky-high rates engendered by government borrowing will prove a far more formidable impediment to Brazilian development than the need to send $10.5 billion a year to foreign lenders.

There are few investment projects that can be justified at current interest rates, according to Knowlton King, a top executive of Continental Can Co.'s Brazilian operations.

"Companies find it better to invest in money markets than in plants," according to Ulysses Gemerais, the speaker of Brazil's House of Representatives. "No economy can withstand the levels of interest rates we have in Brazil."

Today, the rates are not a major obstacle to Brazilian economic growth. There are enough idle factories in Brazil to sustain an economic recovery for some time without major, broadscale expansion. Sarney adviser Rosenberg said that, on average, 30 percent of Brazilian industry is idle and in some industries idle capacity approaches 30 percent.

"Many industries invested heavily at the end of the last decade, in anticipation of 12 percent economic growth. Those plants are very modern and very idle," Rosenberg said.

But at some point, probably about two years away, substantial new investment will be needed, according to Carlos Antonio Rocca, president of Mappin, Sao Paulo's biggest retailer and a professor at the University of Sao Paulo.

It is then -- or sooner in the eyes of some economists -- that the big government deficits and the need to repay the foreign debt will start to impede seriously Brazilian growth. "But Brazil is a little luckier, perhaps, than some countries," said a top foreign executive based here. "It's got some time and some options. And it is earning dollars."

While most debtor nations are scrambling to generate enough foreign income to pay their foreign interest and have something left over for the imports vital to keep their economies functioning at a minimal level, coming up with dollars is not Brazil's biggest problem today.

Last year, Brazil's export industries ran up a $13 billion trade surplus, more than enough to pay its interest bills. The increase in exports is attributable both to the aggressiveness of the exports industries and the aggressiveness of Brazil's exchange rate policies, which make Brazilian exports relatively cheap and its imports expensive.

The exchange rate policy also encourages exports because industries generally realize more cruzeiros for a foreign sale than for a sale on the domestic market, according to Andre Beer, vice president of General Motors Brazil. One quarter of the 950,000 automobiles produced in Brazil are exported -- to markets in the Middle East, Latin America, Africa and Europe, Beer said.

But Brazilian officials are worried about the protectionist pressures in the developing world. The European Community is making it difficult for Brazil to increase its exports there and exporting to Japan is hard, according to Paulo Tarso Flecha Lima, the top trade official in the Brazilian foreign ministry.

The United States, Brazil's major trading partner, has been more open, he said.

Brazil was relieved when President Reagan rejected curbs on U.S. imports of shoes, a major Brazilian export. But former planning minister Antonio Delfim Netto said that even the threat of protectionist measures impedes investment. "If people are afraid the U.S. will lash out against shoe imports, they won't invest. So even if the United States doesn't do it, the protectionists accomplish the same thing."

Brazil's aggressive exporting is getting it into trouble with its debtor neighbors, forcing the country to rethink its policies, according to Foreign Minister Olavo Setubal.

Brazil has not only been running a big trade surplus with developed countries, but also with developing countries that need to conserve every dollar they can. Brazil has just agreed to buy more wheat from Argentina to bring its trade account closer to balance with its southern neighbor.

Officials said that Brazil also is beginning to learn how to wield its imports as a weapon. The country, with nearly 140 million people, is a major world buyer. "Brazil will direct its imports to those countries that buy Brazilian exports," said a top Brazilian economist.

Top presidential advisers like Sayad and Rosenberg said the country can maintain a minimal growth rate of 5 percent -- enough to keep social pressures from exploding -- and continue to make its $10.5 billion a year in interest payments -- provided world interest rates don't explode again, provided protectionism doesn't increase and provided the world economy does not plunge into a new recession.

Rosenberg said that Brazil does not need to increase the size of its trade surplus, so every dollar increase in exports is a dollar it can use to buy imports to use in production or for investment in new plants and equipment.

"The country can grow at 5 percent and maybe repay a little principal or at 6 percent, if its get some fresh outside resources," he said.

When export projects begun in the early 1980s -- including a massive iron ore and minerals project in the Amazon region -- are completed, Brazil's ability to generate exports will increase. At the same time, Brazil has been steadily reducing its reliance on foreign oil -- the result of a massive petroleum exploration program and the substitution of hydroelectric power and alcohol fuels (made from domestic sugar cane) for oil products. "Oil prices can't destroy Brazil any more," said Rosenberg.

That combination will allow Brazil to boost its imports sizeably and still run a big enough trade surplus to pay its debts, according to economist and executive Rocca.

But maintaining a 5 percent growth rate will do little to improve the economic situation for the average Brazilian, Rosenberg conceded.

Despite Brazil's vaunted economic growth, extreme poverty is a way of life for most Brazilians. Massive slums have grown up in the country's key cities, including Sao Paul and Rio de Janeiro.

In the arid North, conditions are even more desperate. The region is badly in need of irrigation projects that the country cannot afford to build. Most Brazilians subsist on a daily diet that does not provide them the minimum daily caloric requirements. "The wonder is that they manage to survive at all," said Sergio P. Mendes, a Sao Paulo businessman and consultant.

Yet the production of consumer foodstuff appears to be declining, according to Donald Wilson, vice president of the U.S. food processor Anderson-Clayton.

In the country's headlong rush to produce for export, its most efficient farmers have shied away from producing basic foodstuffs -- such as corn, beans and rice -- in favor of export crops like oranges, soybeans and coffee.

"The country's income distribution is among the worst in the world. How long that can last is a question to which I don't have an answer," according to Edmar Bacha, director of Brazil's Institute of Geography and Statistics.

Brazil must find new areas to cut its federal spending if it is to free up the resources necessary to tackle some of its social problems and buy enough dollars to pay its debt.

Brazilian officials -- from Sarney on down -- are talking about the need to get rid of many of the state-owned enterprises that are a drag on the federal coffers. But Brazil, like most other Latin American countries, long has played a dominant role in industry and any serious dismantling of the state enterprises would be hard to achieve.

Realistically, however, Brazil probably will need a sharp increase in funds within two years if it is to continue to grow at a rate that not only provides enough jobs to keep unemployment from rising but begins to cut into the huge pool of unemployed and underemployed workers.

That probably will require new funds from foreign sources -- funds that right now are hard to come by for Brazil and the rest of Latin America.

Sarney adviser Rosenberg said that if the economy can grow 5 percent a year it will provide "hope" for the country's underclass.

But Foreign Minister Setubal said he is concerned that the country needs more and that Western democracies provide lip service to the emergence of democracy in Brazil, Argentina and Uruguay but little more.

"After World War II, U.S. taxpayers paid for the Marshall Plan. It was the greatest achievement ever in foreign policy. It changed enemies into allies. I hope that today's allies are not transformed -- due to political unrest based on lack of economic development -- into opponents of Western values," Setubal said.