Nearly 60,000 pounds of prime beef went foul recently after sitting for days in the broiling heat of a government warehouse here.

Managua residents, tipped off by the stench, were infuriated because there has been almost no meat to buy in Managua markets for several months.

Francisco Sanchez, a top commerce official in the leftist Sandinista government, explained in an interview this week that the meat was awaiting export, but a state-owned refrigerator went on the blink for lack of parts and the proper shipping cartons arrived late from overseas.

The bad beef symbolized what both pro- and anti-Sandinista analysts are calling the worst economic crisis the government has faced since it came to power in the 1979 revolution. Even advocates of the Sandinistas' radical changes see no hope for improved living conditions in Nicaragua in coming years.

Diplomats and economists say the nine-man Sandinista leadership is now far more vulnerable to pressure on the economic front by the Reagan administration and the U.S-financed counterrevolutionary rebels than on the battlefield, where government troops gained the upper hand in the past year.

The tightest squeeze is on the capital. Since mid-1985, Managua has been a low priority for the government-run distribution of scarce basic foodstuffs and goods. First supplied are the Army's 65,000 regular troops and, to promote their cooperation, residents of rural regions where government forces are fighting the contras.

Managua -- an already disorderly city which has doubled in population since 1979 to nearly 1million -- is a shambles.

Streets everywhere are pocked with large potholes. Streetlights are left dark at night to save electricity and many stoplights do not work, leaving the city littered with car wrecks.

A dwindling water supply is turned off two days a week for most communities. A meningitis epidemic that erupted in June prompted the Managua primary schools to close for two weeks.

In June and July, markets here were largely bare of chicken, beans, rice, and dairy products. Residents ate shark and iguana meat.

In the Roberto Huembes market, one of the capital's largest, more than 80 people waited four hours Tuesday to buy eggs. One weary shopper fainted.

"We're like dogs," a working-class housewife named Maria, 44, commented bitterly to a reporter. "We eat when we find something."

"Many people feel a well-founded desperation about the economic future of this country," said Joseph Collins, a top researcher at the San Francisco-based Institute for Food and Development Policy, which is sympathetic to the government.

Economic strain has produced a level of tension and anxiety not seen in the daily lives of many Nicaraguans since the revolution.

Since the House of Representatives voted in late June to approve $100 million in aid for the contras, Sandinista leaders have said they are bracing for at least five years of full-scale war by moving to a bare-bones survival economy. They seek to minimize imports and grow mainly corn, beans and other basic grains.

The government blames the current crisis on the United States' year-old trade embargo and its moves to block international credits, and war damage by the rebels, known as contras. The Sandinistas' opponents blame increased state control of the economy for a plunge in overall production estimated at 50 percent since 1979.

Nicaragua, hobbled by a dollar shortage, will export goods worth barely $249 million this year, according to official estimates.

In 1978, the year before the revolution, Nicaragua's exports came to $660 million. In the early 1980s, the World Bank projected the Sandinistas would export $1 billion in goods by this year.

To compound the problem, Nicaragua is producing less of goods whose world market value has in many cases plummeted. Sugar prices are rock bottom. However, Cuba will purchase about one-third the 1986 crop at 10 cents per pound over world prices. The coffee crop, battered by contra attacks in 1984, was slow to recover.

The national beef herd has been decimated by rustling and illegal slaughter because the government held official prices down. Ramiro Gurdian, head of the Nicaraguan Agricultural Producers' Union, a private growers' association opposed to the government, estimated Nicaragua will export 9 million pounds of beef this year, compared to 75 million in 1978.

The trade deficit will run about $400 million for the sixth year in a row. Crucial aid to close the gap comes from the Soviet Bloc, estimated at $270 million this year of a total $1.9 billion in nonmilitary aid since 1979.

The Soviets will supply all of Nicaragua's oil needs, 4.5 million barrels this year, virtually free. Western European nations will contribute $100 million credits and donations, European diplomats said.

Symptoms of an ailing economy are omnipresent. About half of Nicaragua's skilled professionals have left to live elsewhere since 1979, the government estimates. At current controlled wages, the highest-paid professionals in Nicaragua earn the equivalent of $17 a week.

This month, Managua hospitals were short on oxygen because eight of 10 trained technicians in the only oxygen-bottling factory in Nicaragua had left the country.

Most analysts agree that defense spending is taxing the economy. The Sandinistas devote about one-quarter of Nicaragua's total production and one-tenth of its work force to the battle against the contras, government figures show.

Motorboats that used to cruise the Pacific Coast for fresh fish are now patrolling for contras.

According to U.S. estimates, Nicaragua lost about 10 percent of its revenues due to the U.S. trade embargo enacted in May 1985. The embargo made it slower and costlier for Nicaraguans, including private producers, to replace urgently needed spare parts.

"It has a gradual crippling effect," said Trevor Evans, a British economist conducting research for the past two years in Nicaragua.

Meanwhile, Sandinista leaders made major investments in ambitious high-technology agricultural projects that gobbled resources without achieving expected results, pro-Sandinista economists said.

Conservative opponents charged that the government sapped private initiative by strictly controlling commerce. Farmer Ramiro Gurdian said private growers have stopped investing in their properties. "It would be silly," he said.

This year, top Sandinista leaders, over the objections of some leftist advisers, reacted to the crisis by giving more economic initiative back to the private sector. Agrarian Reform Minister Jaime Wheelock opened a new phase of the reform that divided dozens of state farms among individual peasant farmers.

Sandinista leaders said the poorest peasants, who were largely ignored by previous governments, will now suffer the least. They will be supplied before anyone else with foodstuffs, batteries, boots, mosquito netting and other basics.

Sandinista officials believe that their speeches blaming the Reagan administration are nurturing a nationalistic reaction among Nicaraguans. They play down consumer discontent as a healthy expression of popular criticism.

"Those are not negative symptoms," asserted Francisco Sanchez, the vice minister of commerce.