Five months after Costa Rica negotiated a three-year, $330-million bail out from the International Monetary Fund, its economy has slid to the point where international commercial banks have suspended all lending and the government has ceased paying all but partial interest on its $2.7 billion debt.

In recent weeks the government of Central America's only civilian democracy has retained three American consulting firms to begin negotiations on debt rescheduling with the commercial banks. Additionally, since Costa Rica is what Washington says it would like the rest of Central America to be politically, it believes the United States will pay almost any price to help it stay afloat.

The 2.2 million people of this proud, self-consciously democratic country continue to maintain their equanimity about the future, and confidence in Costa Rica's pluralistic tradition.

But a combination of factors beyond anyone's control on the international economic scene and the ill-fated melding of good intentions with bad management domestically have made Costa Rica's economy one of the weakest in a region where strong economies have ceased to exist, and moved it ever more rapidly toward total collapse.

For the first time in 30 years Costa Rica's economy is shrinking instead of growing. Official estimates place the drop in gross national product at between 1 and 2 percent. Other analysts estimate it will be more than 5 percent.

With the recession comes more than 8 percent visible unemployment, and if one counts underemployment the figure is perhaps twice that.

Meanwhile, inflation is running at between 40 and 60 percent. Net reserves, already more than $137 million in the hole last December, sank to a phenomenal deficit of $417 million by July.

The national currency, the colon, was worth 8.6 to the dollar a year ago. Now the exchange rate, which fluctuates, is around 40 colons to the dollar.

Yet the government continues to maintain subsidies on public transportation and basic foodstuffs. A bus ride costs less than three cents. Costa Rica imports beans from Chile at 20 colons a kilo (2.2 pounds) and sells them here for 6 colons a kilo.

After a stormy dispute between Costa Rica and the International Monetary Fund last year because Costa Rica could not or would not meet the IMF's politically difficult economic guidelines, the United States lobbied hard with the fund to reach a new agreement.

Months of haggling led finally to an agreement in June for the IMF to grant a three-year, $330 million extended fund facility. The first scheduled disbursement should have come in August, but Costa Rica's government did not even ask for it, knowing that it already had broken the rules again. The country is, for the moment at least, in "noncompliance" with some parts of the agreement and is seeking to renegotiate terms with the fund once again.

International commercial banks have stopped lending to Costa Rica, and the government here is hard-pressed just to meet the interest payments on its current debt. Its difficulties with the IMF are not expected to help it in the commercial debt renegotiation.

To work its way out of this economic morass Costa Rica has retained Kuhn, Loeb Lehman Brothers International and two other American financial consulting firms to spearhead negotiations. Domestic credit to private business has dried up meanwhile, so the government is about to renew it by, in effect, printing more money. That almost certainly will result in more inflation.

It would be hard to overstate the bleakness of the economic landscape, and yet . . .

Teen-agers from the country's large middle class, plugged into their portable tape decks, still roller-skate nonchalantly past shop windows in downtown San Jose instead of smashing them with molotov cocktails.

The stores are not as well-stocked as they were even a few months ago. But on the seemingly endless gift-giving days for mothers, fathers, children, purchases are still made, even if a blender is bought instead of a washing machine, a pipe instead of a stereo. In the evenings there are still lines outside the town's best restaurants, and the poor still eat adequately, though they may have to give up a newspaper or a lottery ticket to do so.

Strikes remain few and brief. Few people march in the streets and when they do they are peaceful. An outbreak of terrorism in the spring and early summer appears to have been crushed by rapid investigation, arrests and luck -- at least for the moment -- and three months later the whole affair seems to many Costa Ricans like little more than a bad dream. A recent hijacking by right-wing Nicaraguan exiles set the coffee shops and bars buzzing once again with talk of coups and doom. But the talk remains talk.

The general election scheduled for February is the basic reason for the relative complacency in a region where similar economic problems have helped precipitate vicious cycles of revolution and repression.

For 30 years Costa Ricans have been building a unique democratic tradition in Latin America, without an army and with the highest standard of living in the area.

On Feb. 7 Costa Ricans will choose a new president and in May he will take office.

The main focus of U.S. policy here until then is to keep a lid on the economic crisis and avoid its spilling over into violence, according to concerned officials.

There is constant worry that peace still prevails here partly because the bite of recession has only begun to be felt.

"The lowering of the standard of living is here. The question is how it is distributed," said one diplomat.

"The economic situation is very bad. It could easily get considerably worse. If it does, it's going to provide cannon fodder for people who would like to attack the system and play into the hands of Marxist-Leninists who say 'bourgeois democracy' doesn't work," said another foreign analyst.

To keep that from happening, more economic aid will be forthcoming from Washington, including Food for Peace loans, probably of about $30 million, designed to relieve some of Costa Rica's balance of payments problems and help generate funds for self-help projects, according to authoritative sources.

Much of the present crisis is blamed on the leadership of President Rodrigo Carazo. The candidate of Carazo's Unity coalition, Rafael Calderon, has changed the colors of the party banner in an effort to distance himself from the present administration.

But virtually everyone here expects that the winner of February's election will be Luis A. Monge, the National Liberation Party candidate.

National Liberation traditionally has expanded the public sector of the economy when it was in power. But its leadership, which already has had talks with multilateral lending institutions, now espouses fiscal conservatism.

"Whether we want it or not, government growth is not possible," said Oscar Arias, secretary general of the National Liberation Party.

Arias said he believed that his party would win not only the presidency but a majority of seats in the powerful National Assembly, something Carazo never had. "We are going to have the political instruments to govern," said Arias.

"They know all the right things to say, and we think they mean it," one foreign official concerned with Costa Rica's economy said of the Liberation leadership.

Many Costa Ricans believe that the new confidence Monge brings to office and his bright economic team led by U.S.-educated Eduardo Lizano will solve their problems almost instantly.

But the Liberation leadership warns that the election in itself will not resolve anything.

The price of oil and skyrocketing interest rates along with worldwide declines in economic growth are as devastating to democratic Costa Rica as to any Central American dictatorship.

"The unemployed in Europe and the United States don't drink our coffee or eat our bananas," Arias said.

Lizano and others believe it will take months and years, a lot of international aid and the opening of new markets in the United States and other countries to straighten out the crippled economy. They are aware that as inflated expectations are disappointed Costa Rica's seeming immunity to regional social and political problems could evaporate.

"The magnetism of the elections is what is really keeping this country together," said one diplomat. But the big test will come after the elections, when no democratic change will be available for another four years.