While criticism from Washington grows sharper and more bellicose, Nicaragua is steadily strengthening a broad range of ties with the Soviet Bloc and with revolutionary Arab states like Libya.

Although the Sandinista revolutionary government here is avowedly Marxist oriented and describes itself as "internationalist," many observers see this trend in relations as more the product of desperation than a natural affinity with its new allies.

The guiding principle behind these links, although never so explicitly stated, appears to be based on the old idea that "the enemy of my enemy is my friend."

The Sandinistas have suspected that the U.S. governent, ever since the days when it supported the dictatorship of Anastasio Somoza, is their worst enemy, and in recent weeks the Reagan administration's public statements have had the effect of confirming that belief.

Despite Assistant Secretary of State Thomas O. Enders' August visit here to smooth relations and an ensuing lull in the verbal war on both sides, those attacks have now resumed as Secretary of State Alexander M. Haig Jr. and other high U.S. officials repeatedly have denounced the Sandinistas and refused to rule out military action against them.

To back up its words, the Reagan administration recently derailed a desperately needed $30 million loan to Nicaragua by the Inter-American Development Bank.

Nicaragua has replied by denouncing the Reagan administration for what it terms "aggressive adventurism," and at the same time has turned to the East. The Sandinistas have firmed up their longstanding ties to Cuba and gone beyond those to embrace the Soviet Union, its European allies or anyone else at odds with Washington.

As the Reagan administration draws up a kind of international enemies list ranging from Soviet leader Leonid Brezhnev to Cuban President Fidel Castro to Libyan leader Muammar Qaddafi, that is where the Sandinistas look for friends.

Nicaragua still depends on Western countries, especially Mexico and Western Europe for much of its economic aid. Even as Defense Minister Humberto Ortega visited Moscow this week, Agriculture Minister Jaime Wheelock was seeking money and moral support in Bonn.

But of most concern to the United States are Nicaragua's growing military ties to Washington's avowed enemies.

Both Nicaraguan officials and diplomatic sources say there is no firm evidence of foreign troop concentrations here or large shipments of military aircraft from Soviet allies to Nicaragua. But more than 50 Nicaraguan pilots trained to fly Mig fighters are now returning from Bulgaria and other East Bloc countries, according to the sources.

Large numbers of East German, Cuban and other military advisers trained by Soviet allies are reported to be on Nicaragua's troubled Atlantic Coast, and, according to one well-informed Sandinista official, they also have a strong presence in the military headquarters here in Managua.

Both the Army's Sector 2, military security, and Sector 5, secret plans, have a particularly large number of advisers, the official said, but declined to give specific figures.

Arms have been supplied to the Sandinistas by the Soviet Bloc, Algeria and Libya as the government here continues the rapid buildup of its military. But the current estimated strength of the regular Army remains about 25,000 soldiers. The militia, a strictly defensive volunteer force, has not yet enlisted 100,000 people despite Sandinista hopes for twice that number.

Beyond the military links that have developed gradually during the last two years, a new element in Nicaraguan life is the presence of propaganda from the Soviet Bloc and even Libya, often making a curious mix with Nicaraguan traditions and the longstanding orientation toward American culture.

On Managua newsstands, in addition to North American comic books and magazines, one finds "Soviet Life," "Soviet Film" and Qaddafi's "Green Book."

Last night the Ruben Dario Theater was packed with Sandinista party members and soldiers ostensibly celebrating the 1,300th anniversary of Bulgarian statehood, although the real drawing card was a Nicaraguan folk group.

Dubbed reruns of "Fantasy Island" on the state-run television are interrupted by commercials for East German documentaries on care for the handicapped and the history of Leipzig.

Edgard Solorzano, press spokesman for the Nicaraguan Association of Friendship with the Socialist Countries, which was founded in July to sponsor much of this activity, described the group and its aims.

It is a branch of the Sandinista party organization with only five members. It has no set budget as yet but gets funding from "similar organizations" in the Soviet Bloc, he said. It was created, said Solorzano, because of the "need to tighten relations with the socialist countries." It disseminates information on their culture and attainments in the frank hope, he added, "that from those relations we get some aid."

Nicaraguan Foreign Minister Miguel D'Escoto points to his country's desperate economic situation and the perceived threats against it as the reason for Nicaragua's ties to the Eastern Bloc and Libya.

Nicaragua needs help anywhere it can find it, and to that end D'Escoto is planning another trip to the Middle East in January. Nicaragua is seeking aid from Libya and the Arabs precisely because it does not want to depend on the Soviets, he said.

As one Libyan official here explained, "We are not Brezhnev. But we all know the U.S. is the great enemy."

D'Escoto said Nicaragua wants "to get into a situation where we do not depend critically on any one country . . . . We will fight with equal zeal to be independent from any country."

But as relations warm with the Soviet Union, Cuba and radical states like Libya, tendencies within the Sandinista National Liberation Front toward authoritarian governments are perhaps inevitably reinforced.

"The activities of members of this government and their statements inside and outside this country reveal involvement in opening up an ideological struggle of an international character that has brought us an almost total isolation from those brother countries that initially helped us in the true Nicaraguan revolution," wrote a group of businessmen in an open letter to the government last month.

"Apparently now the support of countries like Costa Rica or Venezuela is not so important to the government as the support of countries like Libya and Cuba which fit us into a well defined alignment and expose us to suffer the consequences of that alignment."

Three of the businessmen who signed that letter are now in jail.