After more than a year of civil and political violence, and recent U.S. economic pressure, President Anastasio Somoza's government has asked the International Monetary Fund for an emergency loan amounting to Nicargua's entire IMF credit quota, to help avert bankruptcy.

The loan request, which the IMF has agreed to consider, follows Nicaragua's failure to meet payments due on approximately $88 million it owes this year to private foreign banks, principally in the United States.

Nicaragua has asked the IMF for $40 million, the maximum it is eligible for under the Fund's quota system, through a procedure known as a standby credit agreement.

While partial IMF standbys are relatively common, governments generally avoid calling down their entire quotas since such agrecments commit them to broad fiscal reform and IMF-designed economic austerity programs that often cause severe domestic backlash.

The programs usually center on tight internal credit controls, stringent limits on government spending and borrowing, and currency devaluation. For countries in extreme financial straits, they are considered a last-ditch way of reassuring private creditors.

In the case of Nicaragua, economic push came to shove last October after three weeks of civil war between government troops and guerrilla-led civilians. This followed a year of strikes by anti-Somoza businesses and multi-million-dollar capital flight.

By late October, large portions of several main cities lay in runis. As investor confidence plummeted, a $20 million emergency loan deal, requested from an international banking consortium to help the government pay salaries until the end of the year, feel apart.

At the same time, the government withdrew its application for another $20 million, requested through the IMF's conventional loan facility, when the United States, in an apparent attempt to pressure Somoza, privately indicated it would oppose the application.

It was then that Nicaragua stopped making payments on the total of $350 million it owes foreign banks. From October to the end of the year, about $23 million went unpaid. An additional $65 million is due this year.

Somoza, who described himself as "outraged" by what he said was a U.S. attempt to overthrow his government through financial squeeze, said last month that he told the bankers to "go ask the United States government for your money."

The banks, led by Citibank and the First National Bank of Chicago, agreed to reschedule Nicaragua's debt and defer payment on all but interest until the end of 1979, Somoza said.

Informed banking and diplomatic sources, however, have another version of events.

A Nicaraguan government financial team, the sources said, arrived in New York in December with a refinancing proposal -- a program to lend Nicaragua more money to help pay existing debt due this year -- which the banks turned down.

The financial team returned in February, they said, with a more concrete proposal and the bankers formed a committee to study it. Meanwhile, the Nicaraguan government early this month decided to request the IMF standby in an apparent attempt to show the bankers, by virtue of an IMF austerity program, that Nicaragua will be able to play its bills.

For the moment, sources said, the government is paying interest only on its private bank loans, and the banks appear to be waiting to see what the IMF will do.

It is now up to Nicaragua to present the IMF a fiscal management plan. With that plan in hand, an IMF investigative team will travel to Nicaragua for a two-to-three-week study of the economy and a determination of the fiscal changes needed.

While Somoza may agree to the kind of harsh austerity program the IMF is likely to demand, it is unclear whether his government, which is opposed by the majority of the country's business leaders and is still beleaguered by guerrilla attacks, will have the power to impose it or will even be around long enough to guarantee its conditions.

For Somoza's supporters, an IMF program would mean the end of the spending practices that have traditionally guaranteed their loyalty.

In what one economic analyst described as "spending itself into oblivion," the Somoza government had put the economy in jeopardy as early as 1977, before the strikes and guerrilla attacks began in force, by funneling money into state development banks.

The state banks, sources said, would then loan the money to favored supporters of officials for fictitious projects. When the "projects" failed, the borrowers would pocket the funds, and the government covered the shortfalls with overseas borrowing.

In mid-1978, Nicaragua requested a partial IMF standby agreement, for $25 million. An IMF investigative team at that time was forced to abandon its study in midstream, a source said, when widespread violence erupted and the country's economic officials were "all too busy defending their lives."