Shortly after Panamanian strongman Omar Torrijos arrived here Saturday for a two-day state visit, he was presented with an Israeli made Galil submachine gun by leaders of Nicaragua's new revolutionary government.

The presentation was symbolic since Torrijos provided the Sandinistas with military, dipolmatic and financial support during their guerrilla war against former president Anastasio Somoza. Torrijos is considered a hero of the Nicaraguan revolution, a symbol of the international support the victorious Sandinistas received.

The Galil, however, is a symbol of the Sandinista victory for a different reason. It and the Isaeli made Uzi submachine gun were the principal weapons used against the guerrillas by Somoza's defeated National Guard.

"Our people know of Israel's complicity with Somoza, and they greatly resent it," Nicaraguan Foreign Minister Miguel D'Escoto said in an interview last week. "On the other hand, we are greatly appreciative of the role played by the Palestine Liberation Organization and by many of the Arab states" in helping the Sandinista cause, he said.

The PLO'S prize for providing arms, political support and according to informed sources here, training for the Sandinistas likely will be the right to open a fully accredited office in Managua. Israel's punishment for aiding Somoza is the loss of a dependable ally that provided arms during the Jewish state's war for independence in 1942 and consistently voted with Israel in the United Nations.

Although Israel recognized Nicaragua's new government, the junta's sympathies and votes in international forums likely will be pro PLO.

A delegation of the Organization of Petroleum Exporting Countries arrived this weekend to help the new government and Arturo Cruz, president of Nicaragua's Central Bank, said he is hoping to receive between $50 million and $100 million from OPEC.

The involvement of both Israel and the POL on opposite sides of Nicaragus's recent civil war is one example of their growing rivalry in Latin America, where Israel traditionally had many friends and is doing all it can to keep them, including the reported sale of sophisticated arms to countries with right wing military governments such as Somoza's Nicaragua, Argentina and Chile.

The Palestinians, meanwhile, supported by their allies among the Arab oil-producing states, especially Iraq and Libya, have mounted an increasingly effective campaign in recent years to gain influence with Latin American governments.

This campaign is not unlike PLO efforts in the United States, where the Palestinians have information offices in New York City and Washington.

In Latin America, the PLO has been most successful with countries that are either heavily dependent on Middle Eastern oil, such as Brazil, which is considering an Iraqi request that the PLO be allowed to open an information office, or in countries with pretensions of Third World leadership, such as Peru and Mexico which have voted with the PLO in the United Nations and have allowed PLO information offices in Lima and Mexico City.

Mexico, which found that American Jews were boycotting its resorts four years ago as a result of its pro-PLO stance, has improved its relations with Israel in recent years and has allowed Israeli aircraft industries to open an office in its capital.

Where the PLO has been unable to improve its ties with Central and South American governments, it has become allied with revolutionary groups such as the Sandinistas or the Montoneros in Argentina and the Tupamaros in Uruguay.

PLO leader Yasser Arafat has met with the leaders of both of these urban guerrilla groups and, according to Israeli and other intelligence sources, covertly has provided arms and training to them.

On Feb. 1, the Libyans hosted a conference in Benghazi of "progressive revolutionary organizations of Latin America,"which included representatives of the Argentine and Uruguayan guerrilla groups among others, according to published accounts of the meeting.

Meanwhile, Israel, which has diplomatic relations with almost all Latin American and Caribbean countries, has been willing to sell arms, with few exceptions, to any country that wants to buy. Among the countries Israel has either offered or sold arms to are Ecuador, Costa Rica and according to Western diplomats, both Argentina and Chile, which were on the brink of war with each other last year.

Israel also maintains an extensive propaganda apparatus in Buenos Aires called the Center of Information and Documentation of Israel for Latin America. Israeli intelligence also is active in a number of Latin American countries, according to well informed sources.

Although the current rivalry between the PLO and Israel for power and influence in Latin America is known only partially, the activities of both sides in Nicaragua and Brazil have become public in recent months.

During a visit to Brazil last May, a high Iraqi official requested permission for the PLO to open an information office. The request, under study by the Brazilian government, set off a storm of controversy after the press and Jewish leaders charged that the government was caving in to blackmail because Iraq provides Brazil with 40 percent ot its oil imports.

The Israeli Embassy in Brasilia has criticized the possibility that the Brazilian government might allow an officially sanctioned PLO office because, in the words of one Israeli diplomat, its presence "would be a very meaningful extension of their capacity to do harm."

In Nicaragua, the PLO joined forces with the Sandinistas several years ago, sometime before Israel became Somoza's chief supplier of arms at the end of 1977.

The Sandinista newspaper here recently reported that Sergio Ramirez, a member of the junta, met with Arafat in Beirut before the war ended.

Several Sandinista soldiers have acknowledged to reporters that some of their fellow guerrillas were trained in Lebanon by the PLO. On Feb. 5, 1978, the PLO and the Sandinistas signed a communique of mutual support in Mexico.

It also is believed that the PLO facilitated arms shipments to the Sandinistas, one subject Sandinista leaders here are reluctant to talk about in detail.

Nonetheless, a chartered U.S. jet owned by Global International Airways, supposedly set to carry a shipment of medical supplies from Lebanon to Costa Rica, was seized in Tunisia this summer after it was found to be carrying weapons destined for the Sandinistas.