Panama's Gen. Omar Torrijos planned to send his own National Guard troops to fight against the government of President Anastosio Somoza in Nicaragua's civil war last September and was narrowly dissuaded by direct White House pressure, according to administration sources.

The sources said Torrijos was "strong-armed" into staying out of the conflict by White House warnings - which one informed administration official said included telephone appeals from presidential assistant Hamilton Jordan - that such action would seriously harm implementation of the Panama Canal treaties.

Despite last spring's Senate ratification victory by a one-vote margin, the administration considers the treaty battle far from over.

Still to come, as soon as the new congressional session opens in two weeks, are House and committee consideration of an administration bill designed to appropriate funds and put specifics into the generalized language of the treaties themselves.

While the administration believes the legislation will pass long before the treaties take effect Oct. 1, there is an axious certainty that a hard fight is in store.

What is most feared, sources said, is that Panama's potential involvement in the volatile Nicaraguan situation will give added fuel to treaty opponents, who view legislation as a post-treaty second chance to kill the accord.

"Nothing would defeat" the legislation more quickly, another administration official close to the issue said, than Panama's entry into a Central American conflict between Nicaragua and Costa Rica, or evidence that Torrijos was supplying Nicaragua's Sandinista guerrillas with guns.

The effects of such a discovery, the official said, "would be absolutely devastating for both Torrijos and us."

Already, Rep. Charles Wilson (D-Tex.), apowerful member of the House Appropriations Committee and staunch supporter of Somoza, has said he will work to defeat the legislation because of Torrijos' involvement with what Wilson called Sandinista "Marxist revolutionaries."

The administration, which is trying to negotiate its own diplomatic solution to the Nicaraguan crisis, in which both the guerrillas and a political coalition are seeking Somoza's ouster, has steered clear of calling the Sandinistas Marxists.

At the same time, it has said both officially and unofficially that it has no confirmation of recently reported intelligence documents outlining a possible arms link between the Sandinistas and Panama.

Administration sources note, however, that when Somoza's troops chases attacking Sandinistas across the Costa Rican border last September, reports quickly reached Washington that Torrijos was massing his soldiers to retaliate on unarmed Costa Rica's behalf.

Following a series of high-level telephone calls from Washington, and diplomatic visits in Panama City, they said, Torrijos contented himself with joining Venezuela in sending some military aircraft to sit threateningly on Costa Rican airstrips.

"Right now," a source said, "Torrijos has buckled under to U.S. pressure" to stay out of the issue.

But there is little doubt that, Marxist or non-Marxist, the Sandinistas present Torrijos with a cause dear to his heart.

For years, Central American governments have been divided into two groups. The rightist, military-allied rulers of Guatemala, El Salvador and Honduras have looked to Nicaragua, and in particular to Somoza, as a successful reflection of their philosophy.

On the other side is Costa Rica, which has maintained a liberal, working democracy since 1949 and, at least as Torrijos sees it, Panama.

Torrijos took power as a "revolutionary" following a 1968 military coup. In the ten years until he stepped down as head of state last October , his government, while controlled by the National Guard he still heads, became progressively less repressive.

At the same time, according to informed sources here and in Panama, Torrijos came to see himself more and more as an international leader in the social democratic tradition. Last summer, following his attainment of global prominence during the treaty negotiations and debates, he established a political party, gave up his title to a new, albeit handpicked, president and steered the country toward elections.

As a newly born elderly statesman and an ostensible "democrat" in the Western tradition, Torrijos views himself as uniquely suited to participate in the Nicaraguan power struggle, sources close to him said.

He is eager to ally himself both with the Sandinistas, whose romantic image, the U.S. administration believes , appeals to him more than their alleged socialist aims, and with Costa Rica, whose reputation in both the democratic and communist worlds is almost without blemish.

But most of all, sources said, Torrijos relishes the opportunity of taking his own crack at Somoza. His strong personal dislike of the Nicaraguan president is well-known throughout Central America.

In addition to stationing some of his military helicopters in Costa Rica, Torrijos has consistently welcomed Sandinista refugees to Panama. When the guerrillas staged a successful raid on the Nicaraguan National Palace last August, they escaped triumphantly to Panama, where they were hailes as heroes.

When Costa Rica, under intense Nicaraguan pressure, periodically rounds up Sandinistas in staging camps there, it deports them to Panama, where they are fed and housed and quickly sent back to the same camps.

While the administration insists that it has no proof Torrijos has gone significantly beyoud these steps, there is what one source called a "constant awareness" of the situation's bearing on the treaty legislation.

Despite their assurances that the legislation will eventually pass, there is serious concern over the damage a lenghty House debate could do to smooth treaty implementation.

In recent interviews here and with U.S. and Panamanian workers and officials in Panama, there was a consensus that the transfer of canal ownership and functions to Panama could turn into "chaos" if the legislation is not passed quickly.

A U.S. diplomat in Panama declined to speculate on when the "threshhold for disaster" would be reached if the legislation is delayed past March. He noted. however, that the bill "ought to have been passed by now if the transfer were going to be smooth." CAPTION: Picture, OMAR TORRIJOS . . . "buckled under to U.S."; Map, no caption, The Washington Post