The firm U.S. opposition to Communists in any new Italian government resulted from a blend of American domestic political pressure as well as foreign policy consideration, authoritative diplomatic sources said today.

Personal pleas by influential leaders on Capitol Hill plus concern for the staunchly anti-Communist sentiments of organized Italian-American voters played an important part in the Carter administration's decisions to speak out, the sources said.

The public expression of American views on Italy's government last week drew reflex criticism from Communists and Socialists here. More surprising, however, is the dismay voiced by Italian political moderates who generally support Washington.

Among the American politicians who are known to have urged the administration to voice strong and public opposition to Communists in the Italian government are Sen. Edward Brooke (R-Mass.), whose constituency includes a large number of Italian-Americans, many of whom traditionally vote Republicans.

Ambassador Richard Gardner, who was called home last week to discuss the Italian crisis, is also known to have spoken with Sen. Frank Church (D-Idaho), who is on the Senate Foreign Relations Committee, and Rep. Peter Rodino (D-N.J.), a leading House figure and important spokesman for the estimated 25 million Italian-Americans.

The Christian Democratic government of Premier Giulio Andreotti resigned yesterday after the Communists, the second biggest party here, withdrew their support and formally demanded places in the Cabinet.

According to those in a position to know, the U.S. dicision to publicly urge that Andreotti resist the Communists demand was based on a fear that elder statesmen among the Christian Democrats were leaning in just that direction. Diplomats cite ambiguous speeches by Aldo Moro, a former premier and now president of the party, as well as by Amintore Fanfani, another ex-premier, as the source of this concern.

American authorities are skeptical of the conventional Italian view that Italian "Eurocommunists" are very much different from the standard, Moscow-oriented Communists. Visitors here are quoted an extract from an interview on Dec. 30 with Luigi Longo, the 77-year-old president of the Italian Communist party. He told the Milan paper, Corriere Della Sera:

"The Russian revolution has been the greatest work that has ever been done . . . It is a propulsive, democratic and progressive force not only for the Soviet nation but also with regard to the situation in the world. Can you imagine what the situation in the world would be, supposing that this great economic, political, military, yes, also military, and ideological force no longer existed?"

U.S. authorities believe last week's statement has stiffened the backbone of the Christian Democrats and has assured that they will resist giving the Communists any ministries. These officials believe the Communists have now been frightened, too, and are pulling back from their demand for Cabinet positions.

The American point of view holds that some lesser Christian Democratic gesture to give the Communists a greater degree of legitimacy would be acceptable provided that a new Christian Democratic government in turn extracted pledges of support for specific austerity measures from the Communists.

Almost everyone here agrees that Italy is now ungovernable without the consent of the Communists and their worker followers, particularly at a time of raging inflation.

The American tactic is supported by some but not all sectors of the Christian Democrats. The outgoing foreign minister, Arnaldo Forlani, suggested that the statement was not helpful. Some in his party fear they will be tagged as "American puppets."

Even more striking, notably pro-American parties like the Republicans have also voiced doubts. Their newspaper, La Voce Republicana, tartly observed on Saturday that the Italian Communists have been attacked by both Moscow and Washington at almost the same moment. Both cannot be right, the paper said, and argued that Moscow knows more about Communists than Washington.

The real fear of Republican leaders is that Washington's cold shoulder could lead to a "stiffening of positions" among the Communists, strengthening old hard-liners like Longo and weakening those who have behaved more moderately, like the party secretary, Enrico Berlinguer.

An important commentator here, who is staunchly pro-Western and anti-Soviet, says he fears that Washington's line could drive Italian Communists back toward Moscow. Moreover, he warns, it will dishearten dissidents in Eastern Europe who have pointed to Italian Communist criticism of Moscow to support their own claims as legitimate, if critical, Communists.

Whichever view is correct, there is little doubt here that the United States enjoys and outsized influence over Italy's fate. Top U.S. officials are working on a set of recommendations for an International Monetary Fund watchdog team due here right after a new government is formed, sources said. Whether or not Italy gets the IMF team's approval will have a profound effect on Italian output, employment and income.

The United States cannot dictate to the team, but as the biggest member by far in the organization, no IMF team can afford to ignore U.S. views.

The officials understood to be working on the recommendations for the IMF include Treasury Secretary Michael Blumenthal, Under Secretary Anthony Solomon, Under Secretary of State for Economic Affairs C. Fred Bergsteen and top diplomats in the U.S. embassy here.

What the watchdog team decides will be not simply a matter of arithmetic, but of political and economic judgement. Italy's foreign currency reserves are now so big it does not need any more of the $500 million loan it negotiated with the fund. But to get that credit, Rome pledged that its budget deficit would not run higher than $17 billion.

The Andreotti government had forecast that its deficit would run $22 billion this year. Moreover, if the new government does not get Communist support to cut public spending and raise charges for public utilities, the deficit will run an estimated $33 billion - twice the IMF limit.

The IMF and Washington are understood to be ready to take a tolerant view of a $22 billion deficit, understanding that there are political limits to belt-tightening. Andreotti is known to have pointed this out forcefully to Ambassador Gardner here.

If, however, the IMF team disapproves of the conduct of any new Italian government, Italy could lose $7 billion that foreign banks have on deposit here. CAPTION:

Picture 1, SENATOR CHURCH; Picture 2, AMBASSADOR GARDNER, Picture 3, SENATOR BROOKE; Picture 4, REPRESENTATIVE RODINO, . . . Capitol Hill figures provided input on administration's decision to speak out against admitting Communists into Italian Cabinet.